I'm trying to use a socket over a SOCKS5 proxy setup using SSHTunnel. The socket connects to the Proxy without issue; ChilkatLog: Connect_Socket(1ms): DllDate: Dec 30 2015 ChilkatVersion: 18.104.22.168 UnlockPrefix: CISCOC Architecture: Little Endian; 64-bit Language: MAC OS X Python 2.* VerboseLogging: 1 objectId: 1 Component successfully unlocked using purchased unlock code. connectInner(1ms): hostname: 22.214.171.124 port: 22 tls: 0 maxWaitMs: 3000 socket2Connect(1ms): socks5Connect(1ms): SOCKS5: socksHostname: 127.0.0.1 socksPort: 1080 socksUsername: vuUoTU5nW9T>s. --SOCKS5 connectSocket: domainOrIpAddress: 127.0.0.1 port: 1080 connectTimeoutMs: 3000 connect_ipv6_or_ipv4: This is an IPV4 numeric address. Domain to IP address resolution not needed. connecting to IPV4 address... ipAddress: 127.0.0.1 createSocket: Setting SO_SNDBUF size sendBufSize: 262144 Setting SO_RCVBUF size recvBufSize: 4194304 --createSocket connect: Waiting for the connect to complete... myIP: 127.0.0.1 myPort: 62142 socket connect successful. --connect --connect_ipv6_or_ipv4 --connectSocket SOCKS5 server selected username/password authentication. --socks5Connect --socket2Connect socketOptions: SO_SNDBUF: 277644 SO_RCVBUF: 4197310 TCP_NODELAY: 0 SO_KEEPALIVE: 8 --socketOptions Success. --connectInner Success. --Connect_Socket --ChilkatLog
The connection to the host @126.96.36.199 failed but there is no indication in the error text or statuses until I shutdown the Proxy and view the accept log; ChilkatLog: sshOpenChannel: sshOpenChannel: Opening new SSH channel within SSH tunnel. sshTransportOpenChannel: channelType: direct-tcpip clientChannel: 100 clientInitialWindowSize: 327680 clientMaxPacketSize: 4096 directTcpHost: 188.8.131.52 directTcpPort: 22 originatorIP: 184.108.40.206 originatorPort: 62141 Sent open channel request Error reading channel response. --sshTransportOpenChannel Failed to open direct-tcpip channel failCode: 0 failReason: --sshOpenChannel --sshOpenChannel --ChilkatLog
In addition, closing the SSHTunnel proxy is taking the default 30 seconds to close which I assume might be the Socket Channel waiting to open on the non-responding device.
Any way to determine the status of the Socket's underlying channel after attempting to Connect?
asked Apr 21 '16 at 08:52
There were some fixes relating to SSH tunnels in v220.127.116.11. I would recommend first testing that version to see where things stand..
answered Apr 21 '16 at 11:09
Tried with the 18.104.22.168 version and still having issues.
The primary problem is the socket.Connect is succeeding in connecting to the proxy server but this is the only status available until the proxy is closed and the accept log is reviewed. The accept log then shows the SSHOpenChannel errors. There does not appear to be way to verify the success/failure of the SSHOpenChannel to the remote host in real-time. The process I'm working on is opening several socket connections to different remote hosts concurrently. The state of each socket to its remote host is needed.