shinysocks icon indicating copy to clipboard operation
shinysocks copied to clipboard

No HTTP(S) traffic goes through

Open marcinjahn opened this issue 2 years ago • 2 comments

I run the app on my Windows host. I configured Firefox (with FoxyProxy) to connect through that Windows host (SOCKS5). Here's what I see when I try to access https://www.google.com on my Linux host (via Firefox):

image

Here's the config of ShinySocks:

; Example configuration file.

interfaces {
    interface {
		; Use to listen on all interfaces
		; hostname "0.0.0.0"
	
		; Use for testing on localhost
        hostname "0.0.0.0"
        port 1080
    }
}


system {
    ; Number of io-threads
    io-threads 4
}

log {
    file "shinysocks_%5N.log"
}

I have only modified the hostname to be 0.0.0.0 from the default 127.0.0.1, because I wanted to be able to connect to the proxy from the external host in my LAN.

Here're the logs of ShinySocks on my Windows host:

2021-11-26 11:40:04.526461 0x00005df4 : Run: Starting io_service in one thread
2021-11-26 11:40:04.528511 0x00005f70 : Run: Starting io_service in one thread
2021-11-26 11:40:04.528848 0x000023d4 : Run: Starting io_service in one thread
2021-11-26 11:40:04.528848 0x00002eb4 : Resolving host=0.0.0.0, port=1080
2021-11-26 11:40:04.528848 0x000054f4 : Run: Starting io_service in one thread
2021-11-26 11:40:04.529353 0x00002eb4 : Listener on 0.0.0.0:1080
2021-11-26 11:40:04.529353 0x00002eb4 : Main thread going to sleep - waiting for shtudown signal
2021-11-26 11:40:06.705132 0x00005f70 : Incoming connection on socket.
2021-11-26 11:40:06.705132 0x000023d4 : Proxy starting on socket 10.3.156.105:1080<-->10.8.114.160:52192
2021-11-26 11:40:06.705132 0x000023d4 : Client is requesting SOCKS5
2021-11-26 11:40:06.719822 0x000023d4 : ParseV5Header: Will try to connect to: client.wns.windows.com
2021-11-26 11:40:06.734881 0x000023d4 : ParseV5Header: host-lookup endpoint: 20.199.120.151:443
2021-11-26 11:40:06.735700 0x000023d4 : Connecting to endpoint 20.199.120.151:443
2021-11-26 11:40:07.216372 0x00005f70 : Incoming connection on socket.
2021-11-26 11:40:07.216372 0x000054f4 : Proxy starting on socket 10.3.156.105:1080<-->10.8.114.160:52194
2021-11-26 11:40:07.216372 0x000054f4 : Client is requesting SOCKS5
2021-11-26 11:40:07.230965 0x000054f4 : ParseV5Header: Will try to connect to: outlook.office.com
2021-11-26 11:40:07.244693 0x000054f4 : ParseV5Header: host-lookup endpoint: 52.97.151.98:443
2021-11-26 11:40:07.244693 0x000054f4 : Connecting to endpoint 52.97.151.98:443
2021-11-26 11:40:07.466769 0x00005f70 : Incoming connection on socket.
2021-11-26 11:40:07.466769 0x00005df4 : Proxy starting on socket 10.3.156.105:1080<-->10.8.114.160:52196
2021-11-26 11:40:07.466769 0x00005df4 : Client is requesting SOCKS5
2021-11-26 11:40:07.483745 0x00005df4 : ParseV5Header: Will try to connect to: outlook.office.com
2021-11-26 11:40:07.497317 0x00005df4 : ParseV5Header: host-lookup endpoint: 52.97.151.98:443
2021-11-26 11:40:07.497317 0x00005df4 : Connecting to endpoint 52.97.151.98:443
2021-11-26 11:40:10.746291 0x00005f70 : Incoming connection on socket.
2021-11-26 11:40:10.746291 0x00005f70 : Proxy starting on socket 10.3.156.105:1080<-->10.8.114.160:52198
2021-11-26 11:40:10.746291 0x00005f70 : Client is requesting SOCKS5
2021-11-26 11:40:10.755828 0x00005f70 : ParseV5Header: Will try to connect to: www.google.com
2021-11-26 11:40:10.763071 0x00005f70 : ParseV5Header: host-lookup endpoint: 172.217.16.36:443
2021-11-26 11:40:10.763071 0x00005f70 : Connecting to endpoint 172.217.16.36:443
2021-11-26 11:40:11.103278 0x00005f70 : Proxy: Caught exception: End of file
2021-11-26 11:40:11.103278 0x00005f70 : Proxy done. Sent 541 bytes, received 3907 bytes.
2021-11-26 11:40:11.111178 0x00005f70 : Proxy::Run coroutine is done
2021-11-26 11:40:11.111178 0x00005f70 : Proxy::RelayRoot: Caught exception: The network connection was aborted by the local system
2021-11-26 11:40:11.112178 0x00005f70 : Proxy::RelayRoot coroutine is done
2021-11-26 11:40:11.112178 0x00005f70 : Leaving ~Proxy()
2021-11-26 11:40:19.728879 0x00002eb4 : Reiceived signal 2. Shutting down
2021-11-26 11:40:19.728879 0x00002eb4 : Main thread is awake
2021-11-26 11:40:19.728879 0x00005f70 : Run: Ended io_service in one thread
2021-11-26 11:40:19.728879 0x000054f4 : Run: Ended io_service in one thread
2021-11-26 11:40:19.728879 0x000023d4 : Run: Ended io_service in one thread
2021-11-26 11:40:19.728879 0x00005df4 : Run: Ended io_service in one thread
2021-11-26 11:40:19.729752 0x00002eb4 : Leaving ~Proxy()
2021-11-26 11:40:19.730859 0x00002eb4 : Leaving ~Proxy()
2021-11-26 11:40:19.731873 0x00002eb4 : Leaving ~Proxy()

What's wrong? Why I cannot browser the web via the ShinySocks proxy?

marcinjahn avatar Nov 26 '21 10:11 marcinjahn

I'll have to take a closer look at this.

jgaa avatar Jan 04 '22 16:01 jgaa

This does not appear to be a proxy issue, it appears to be an HSTS issue. https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security

Your browser has essentially cached a trusted configuration for google.com and is not connecting because the identity has changed due to the proxy. The easiest workaround is to use a browser that does not have the cached google.com HSTS values: an incognito/private session or a separate browser should do the trick.

sss0bbb avatar Apr 26 '22 18:04 sss0bbb