Skip to content

Commit 3b2bfaf

Browse files
committed
refactor(gateway,pkg,ssh): change v2 tunnel route to a more meaning name
1 parent c1db8f1 commit 3b2bfaf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

gateway/nginx/conf.d/shellhub.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ server {
368368
proxy_redirect off;
369369
}
370370

371-
location /connection {
371+
location /agent/connection {
372372
set $upstream ssh:8080;
373373

374374
auth_request /auth;

pkg/agent/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ func (a *Agent) listenV2(ctx context.Context) error {
500500
return
501501
}
502502

503-
ShellHubConnectV2Path := "/connection"
503+
ShellHubConnectV2Path := "/agent/connection"
504504

505505
logger.Debug("Using tunnel version 2")
506506

ssh/http/handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const (
3838
// HandleConnectionV2Path is the connection endpoint where agents using yamux/multistream connects to
3939
// establish a WebSocket connection. Subsequent logical streams are opened without additional HTTP
4040
// handshakes and are protocol-negotiated via multistream-select.
41-
HandleConnectionV2Path = "/connection"
41+
HandleConnectionV2Path = "/agent/connection"
4242
)
4343

4444
const (

0 commit comments

Comments
 (0)