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

local to reconnect to server #37

Closed
kalmarz opened this issue Apr 23, 2022 · 3 comments
Closed

local to reconnect to server #37

kalmarz opened this issue Apr 23, 2022 · 3 comments

Comments

@kalmarz
Copy link

kalmarz commented Apr 23, 2022

Hey, I'm wondering if there's a way (at least on the roadmap) for local to reconnect to the server if something comes into the way? My local stuff is inside the home network and the server runs on a VPS out in the wild. When I'm not home while the server restarts, I loose connection until I get back and also restart the local.

@jie65535
Copy link

jie65535 commented Apr 24, 2022

Maybe you can use systemd to daemonize the client.

My local unit like:
/etc/systemd/system/bore-ssh.service:

[Unit]
Description=bore local ssh
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=bore local 22 --to <hosrtname> --port <remote-port> --secret <secret-string>
Restart=always
RestartSec=60s
User=root

[Install]
WantedBy=default.target

Hope this helps you :)

@kalmarz
Copy link
Author

kalmarz commented Apr 24, 2022

that's nice, thank you. however I run local on a Kubernetes cluster.

@kalmarz
Copy link
Author

kalmarz commented Apr 24, 2022

Anyways, the latest build seemingly doesn't have reconnection issues. I works perfectly on the cluster, picks up the connection when the server comes back alive.

@kalmarz kalmarz closed this as completed Apr 24, 2022
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

No branches or pull requests

2 participants