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] ssh: tcpChan: deadline not supported #911

Closed
1 task done
totoro52 opened this issue Apr 11, 2024 · 1 comment
Closed
1 task done

[BUG] ssh: tcpChan: deadline not supported #911

totoro52 opened this issue Apr 11, 2024 · 1 comment
Labels

Comments

@totoro52
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

		sshConfig := &ssh.ClientConfig{
			User: "xxx",
			Auth: []ssh.AuthMethod{
				ssh.Password("xxx"),
			},
			HostKeyCallback: ssh.InsecureIgnoreHostKey(),
			Timeout:         10 * time.Second,
		}
		client, err := ssh.Dial("tcp", "xxx:22", sshConfig)
		if err != nil {
			log.Fatal("Failed to dial: ", err)
		}
		defer client.Close()
		dialer = websocket.Dialer{Proxy: nil, HandshakeTimeout: 10 * time.Second}
		dialer.NetDialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
			return client.Dial(network, addr)
		}
               dialer = websocket.Dialer{Proxy: nil, HandshakeTimeout: 10 * time.Second}

I am using the SSH tunnel as a proxy, but it doesn't seem to work properly. Can I do that?

Expected Behavior

No response

Steps To Reproduce

No response

Anything else?

No response

@totoro52 totoro52 added the bug label Apr 11, 2024
@totoro52
Copy link
Author

Thank you for your reply, I have followed the first method you said, as for the elimination of dialer timeout this method I have tried, but it does not work.

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

No branches or pull requests

1 participant