[GH-ISSUE #197] If the hostname cannot be resolved, then ips should be used. #88

Closed
opened 2026-05-05 22:08:42 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @livexia on GitHub (Sep 11, 2024).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/197

I think if the hostname cannot be resolved, then ips in config.toml should be used.

If I leave out hostname in config.toml the ui won't show the ips.

[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: GetState(1)            │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"UpdateHostname│
~       │":[1,null]}                                                                     │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"UpdatePosition│
~       │":[1,"Left"]}                                                                   │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"UpdatePort":[1│
~       │,4242]}                                                                         │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"ResolveDns":1}│
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"GetState":1}  │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: UpdateHo│
~       │stname(1, None)                                                                 │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: UpdateHostname(1, None)│
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: UpdatePo│
~       │sition(1, Left)                                                                 │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: UpdatePosition(1, Left)│
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: UpdatePo│
~       │rt(1, 4242)                                                                     │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: UpdatePort(1, 4242)    │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: ResolveD│
~       │ns(1)                                                                           │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: ResolveDns(1)          │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"GetState":1}  │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: GetState│
~       │(1)                                                                             │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: GetState(1)            │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: GetState│
~       │(1)                                                                             │
~       │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: GetState(1)      

config.toml

# optional port (defaults to 4242)
port = 4242
# optional frontend -> defaults to gtk if available
# frontend = "gtk"

# define a client on the right side with host name "iridium"
[right]
hostname = "Pixelbook-Go"
ips = ["192.168.31.127"]
port = 4242

[left]
# hostname = "MacBook-Go-2"
ips = ["192.168.32.176"]
port = 4242

Originally created by @livexia on GitHub (Sep 11, 2024). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/197 I think if the hostname cannot be resolved, then ips in `config.toml` should be used. If I leave out hostname in `config.toml` the ui won't show the ips. ``` [2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: GetState(1) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"UpdateHostname│ ~ │":[1,null]} │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"UpdatePosition│ ~ │":[1,"Left"]} │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"UpdatePort":[1│ ~ │,4242]} │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"ResolveDns":1}│ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"GetState":1} │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: UpdateHo│ ~ │stname(1, None) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: UpdateHostname(1, None)│ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: UpdatePo│ ~ │sition(1, Left) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: UpdatePosition(1, Left)│ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: UpdatePo│ ~ │rt(1, 4242) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: UpdatePort(1, 4242) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: ResolveD│ ~ │ns(1) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: ResolveDns(1) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse_ipc::connect] requesting: {"GetState":1} │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: GetState│ ~ │(1) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: GetState(1) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] handle frontend request: GetState│ ~ │(1) │ ~ │[2024-09-11T08:12:55Z DEBUG lan_mouse::server] frontend: GetState(1) ``` config.toml ``` # optional port (defaults to 4242) port = 4242 # optional frontend -> defaults to gtk if available # frontend = "gtk" # define a client on the right side with host name "iridium" [right] hostname = "Pixelbook-Go" ips = ["192.168.31.127"] port = 4242 [left] # hostname = "MacBook-Go-2" ips = ["192.168.32.176"] port = 4242 ```
Author
Owner

@feschber commented on GitHub (Sep 11, 2024):

They do get used, they just do not show up in the UI yet.
My plan is to have the field that is currently only for the hostname optionally accept ip addresses, when given instead.
And then maybe show a list of active ips somewhere in the menu.

<!-- gh-comment-id:2343034153 --> @feschber commented on GitHub (Sep 11, 2024): They do get used, they just do not show up in the UI yet. My plan is to have the field that is currently only for the hostname optionally accept ip addresses, when given instead. And then maybe show a list of active ips somewhere in the menu.
Author
Owner

@livexia commented on GitHub (Sep 11, 2024):

Yes, you are right, I test on another machine even the dns unable to resolve, I can still share mouse. I will close now, sorry for the wrong issue.

<!-- gh-comment-id:2343076450 --> @livexia commented on GitHub (Sep 11, 2024): Yes, you are right, I test on another machine even the dns unable to resolve, I can still share mouse. I will close now, sorry for the wrong issue.
Author
Owner

@livexia commented on GitHub (Sep 11, 2024):

Yes, you are right, I test on another machine even the dns unable to resolve, I can still share mouse. I will close now, sorry for the wrong issue.

There is another problem when I test with two macos, I found that the shift won't work while using another machine's keyboard.

<!-- gh-comment-id:2343084818 --> @livexia commented on GitHub (Sep 11, 2024): > Yes, you are right, I test on another machine even the dns unable to resolve, I can still share mouse. I will close now, sorry for the wrong issue. There is another problem when I test with two macos, I found that the shift won't work while using another machine's keyboard.
Author
Owner

@feschber commented on GitHub (Sep 11, 2024):

Yeah macos has some issues. The main problem is the fact that I can only test MacOS on some hacky virtual machines because I dont have a Mac myself.

<!-- gh-comment-id:2343174234 --> @feschber commented on GitHub (Sep 11, 2024): Yeah macos has some issues. The main problem is the fact that I can only test MacOS on some hacky virtual machines because I dont have a Mac myself.
Author
Owner

@livexia commented on GitHub (Sep 11, 2024):

I have a mac and a problematic
hackintosh maybe I can do some test for you but I don't think that will be more helpful.

<!-- gh-comment-id:2343188125 --> @livexia commented on GitHub (Sep 11, 2024): I have a mac and a problematic hackintosh maybe I can do some test for you but I don't think that will be more helpful.
Author
Owner

@feschber commented on GitHub (Sep 11, 2024):

No worries, it's not very intuitive!

<!-- gh-comment-id:2343252505 --> @feschber commented on GitHub (Sep 11, 2024): No worries, it's not very intuitive!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#88
No description provided.