Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug(?)/Feature Request: "new client port" is always zero. Print Port of Connected Machines? #75

Closed
JosephCatrambone opened this issue Apr 13, 2023 · 1 comment · Fixed by #79

Comments

@JosephCatrambone
Copy link

tl;dr: The bore-cli tool in server mode always prints zero for the new client port: bore_cli::server: new client port=0. The port shown for the connecting message does not match the listening port to which one needs to ssh. E.g., 2023-04-13T05:40:39.659060Z INFO control{addr=76.21.0.202:58074}: does not accept SSH connections via ssh -p 58074 76.21.0.202.

My feature request in a nutshell is: "Would it be possible to query the server for open connections and/or to have it print the port into which we can ssh?"

Now:

# Remote server:
boreuser@borehost:~# bore server
2023-04-13T05:40:04.011082Z  INFO bore_cli::server: server listening addr=0.0.0.0:7835

# Some other machine:
joseph@hilbert:~/Applications$ ./bore local --to borehost.example.com
2023-04-13T05:40:39.668958Z  INFO bore_cli::client: connected to server remote_port=36647
2023-04-13T05:40:39.669006Z  INFO bore_cli::client: listening at borehost.example.com:36647 

# Remote server:
2023-04-13T05:40:39.635870Z  INFO control{addr=76.21.0.202:58074}: bore_cli::server: incoming connection
2023-04-13T05:40:39.659060Z  INFO control{addr=76.21.0.202:58074}: bore_cli::server: new client port=0

To reiterate: Note the difference in addresses: 58074 != 36647. Also, the "new client port = 0". It would be useful to me if I could also see the "listening at" port so when my machines drop and reconnect I can pick them up OR it would be useful to have a command I could run on the bore server that says "print all the active tunnel connections".

Ideal:

# Remote server:
boreuser@borehost:~# bore server
2023-04-13T05:40:04.011082Z  INFO bore_cli::server: server listening addr=0.0.0.0:7835

# Some other machine:
joseph@hilbert:~$ ./bore local --to borehost.example.com
2023-04-13T05:40:39.668958Z  INFO bore_cli::client: connected to server remote_port=36647
2023-04-13T05:40:39.669006Z  INFO bore_cli::client: listening at borehost.example.com:36647 

# Remote server:
2023-04-13T05:40:39.635870Z  INFO control{addr=76.21.0.202:58074}: bore_cli::server: incoming connection
2023-04-13T05:40:39.659060Z  INFO control{addr=76.21.0.202:58074}: bore_cli::server: new client port=36647
$ new tmux terminal
boreuser@borehost:~# bore server --print-active
36647: active for 24 minutes
31337: active for 48 days
42069: active for 128 days

Also, my thanks for making bore.

@ekzhang
Copy link
Owner

ekzhang commented Apr 21, 2023

Hi, thanks for the feature request. I can see why printing active ports would be useful. However there is no mechanism for multiple bore server command instances to communicate at the moment. Also bore is intended to be a minimal application and not fully-featured, which is why the feature-set is kept intentionally limited.

That said, I agree we should print out the actual assigned port on the server side (not just 0) and will batch this in with the other random port change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants