pufferffish / wireproxy

Wireguard client that exposes itself as a socks5 proxy
ISC License
4.1k stars 233 forks source link

ERR_CONNECTION_CLOSED on Chrome with SOCKS5 and HTTP #125

Closed the-gabe closed 2 weeks ago

the-gabe commented 2 weeks ago

Wireproxy config:

[Interface]
PrivateKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Address = 10.66.162.227/32
DNS = 10.64.0.1
MTU = 1300

[Peer]
PublicKey = bPfJDdgBXlY4w3ACs68zOMMhLUbbzktCKnLOFHqbxl4=
AllowedIPs = 0.0.0.0/0,::0/0
Endpoint = 31.171.153.66:51820

[Socks5]
BindAddress = 0.0.0.0:1080

[Http]
BindAddress = 0.0.0.0:8080

I'm using google-chrome --proxy-server="socks5://127.0.0.1:1080" https://wtfismyip.com/text to test, this gives out ERR_CONNECTION_CLOSED. Same with google-chrome --proxy-server="http://127.0.0.1:8080" https://wtfismyip.com/text.

I don't understand why. cURL works fine.

curl --proxy "socks5://127.0.0.1:1080" https://wtfismyip.com/text works fine

curl --proxy "http://127.0.0.1:8080" https://wtfismyip.com/text works fine

NOTE: log output is the same for both HTTP and SOCKS5 proxy modes for both wireproxy and chrome.

I'm using Google Chrome 125.0.6422.141 and Wireproxy built with "make" from e749217090d15887f4dda6f82bb85837ef562658

Logs from wireproxy:

DEBUG: 2024/06/08 10:51:33 UAPI: Updating private key DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 8 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 12 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 6 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 4 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 8 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 4 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 15 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 5 - started`` DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 5 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 1 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 14 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 12 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 6 - started DEBUG: 2024/06/08 10:51:33 peer(bPfJ…bxl4) - UAPI: Created DEBUG: 2024/06/08 10:51:33 peer(bPfJ…bxl4) - UAPI: Updating persistent keepalive interval DEBUG: 2024/06/08 10:51:33 peer(bPfJ…bxl4) - UAPI: Updating preshared key DEBUG: 2024/06/08 10:51:33 peer(bPfJ…bxl4) - UAPI: Updating endpoint DEBUG: 2024/06/08 10:51:33 peer(bPfJ…bxl4) - UAPI: Adding allowedip DEBUG: 2024/06/08 10:51:33 peer(bPfJ…bxl4) - UAPI: Adding allowedip DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 6 - started DEBUG: 2024/06/08 10:51:33 Routine: event worker - started DEBUG: 2024/06/08 10:51:33 Interface up requested DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 7 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 7 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 7 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 5 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 8 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 9 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 4 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 2 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 9 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 15 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 2 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 1 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 9 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 13 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 2 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 13 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 3 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 10 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 3 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 13 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 15 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 10 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 14 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 16 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 10 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 3 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 16 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 11 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 14 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 11 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 16 - started DEBUG: 2024/06/08 10:51:33 Routine: encryption worker 12 - started DEBUG: 2024/06/08 10:51:33 Routine: decryption worker 11 - started DEBUG: 2024/06/08 10:51:33 Routine: handshake worker 1 - started DEBUG: 2024/06/08 10:51:33 Routine: TUN reader - started DEBUG: 2024/06/08 10:51:33 UDP bind has been updated DEBUG: 2024/06/08 10:51:33 peer(bPfJ…bxl4) - Starting DEBUG: 2024/06/08 10:51:33 Interface state was Down, requested Up, now Up DEBUG: 2024/06/08 10:51:33 Routine: receive incoming v4 - started DEBUG: 2024/06/08 10:51:33 peer(bPfJ…bxl4) - Routine: sequential sender - started DEBUG: 2024/06/08 10:51:33 peer(bPfJ…bxl4) - Routine: sequential receiver - started DEBUG: 2024/06/08 10:51:33 Routine: receive incoming v6 - started DEBUG: 2024/06/08 10:51:44 peer(bPfJ…bxl4) - Sending handshake initiation DEBUG: 2024/06/08 10:51:44 peer(bPfJ…bxl4) - Received handshake response

Logs from Chrome:

[1238039:1238039:0608/105144.698152:ERROR:viz_main_impl.cc(166)] Exiting GPU process due to errors during initialization [1237999:1238137:0608/105144.764104:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [1237999:1238137:0608/105144.765438:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [1237999:1238137:0608/105144.766113:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [1238134:1238134:0608/105144.938157:ERROR:viz_main_impl.cc(166)] Exiting GPU process due to errors during initialization [1238064:7:0608/105145.053399:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer. Created TensorFlow Lite XNNPACK delegate for CPU. [1238040:1238053:0608/105153.124544:ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 [1238040:1238053:0608/105155.152964:ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 [1238040:1238053:0608/105155.153838:ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 [1238040:1238053:0608/105159.938970:ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 [1238040:1238053:0608/105201.503117:ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 Fontconfig error: Cannot load default config file: No such file: (null) [1238040:1238053:0608/105204.847345:ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100 [1238040:1238053:0608/105205.404154:ERROR:ssl_client_socket_impl.cc(879)] handshake failed; returned -1, SSL error code 1, net_error -100

the-gabe commented 2 weeks ago

Lowering MTU to 1220 fixed this for me. I could not use a higher MTU. Consider using lower MTU than this if you have this issue.