ShadowsocksR-Live / shadowsocksr-native

翻墙 从容穿越党国敏感日 ShadowsocksR (SSRoT) native implementation for all platforms, GFW terminator
https://github.com/ShadowsocksR-Live/shadowsocksr-native/wiki
GNU General Public License v3.0
2.74k stars 763 forks source link

Can't make it work: curl: (52) Empty reply from server #187

Closed uqix closed 3 years ago

uqix commented 3 years ago

ssr-client log

[vagrant@master shadowsocksr-native]$ ssr-client 
ssr-client 2020/11/25 14:15  info  ShadowsocksR native client

ssr-client 2020/11/25 14:15  info  remote server    jp-s************************:6007
ssr-client 2020/11/25 14:15  info  method           chacha20-ietf
ssr-client 2020/11/25 14:15  info  password         8A****
ssr-client 2020/11/25 14:15  info  protocol         auth_aes128_md5
ssr-client 2020/11/25 14:15  info  protocol_param   ***p
ssr-client 2020/11/25 14:15  info  obfs             tls1.2_ticket_auth
ssr-client 2020/11/25 14:15  info  obfs_param       ***.com
ssr-client 2020/11/25 14:15  info  udp relay        no

ssr-client 2020/11/25 14:15  info  listening on     0.0.0.0:10086

Open a new terminal

export http_proxy=socks5h://127.0.0.1:10086
export https_proxy=socks5h://127.0.0.1:10086

curl -v https://google.com 

ssr-client log

ssr-client 2020/11/25 14:18  info  ==== tunnel created     count   1 ====
ssr-client 2020/11/25 14:18  info  tunnel_stage_handshake -- Client App S5 handshake coming.
ssr-client 2020/11/25 14:18  info  tunnel_stage_handshake_replied -- Start waiting for request data.
ssr-client 2020/11/25 14:18  info  tunnel_stage_s5_request_from_client_app -- SOCKS5 Request data from client app.
ssr-client 2020/11/25 14:18  info  tunnel_stage_s5_response_done
ssr-client 2020/11/25 14:18  info  tunnel_stage_client_first_pkg
ssr-client 2020/11/25 14:18  info  ++++ connecting  "google.com:80" ... ++++
ssr-client 2020/11/25 14:18  info  tunnel_stage_resolve_ssr_server_host_done -- Upstream hostname DNS lookup has completed.
ssr-client 2020/11/25 14:18  info  tunnel_stage_connect_ssr_server_done -- Connect to server complete.
ssr-client 2020/11/25 14:18  info  tunnel_stage_ssr_auth_sent
ssr-client 2020/11/25 14:18  info  ---- disconnected  "google.com:80" ----
ssr-client 2020/11/25 14:18  info  ==== tunnel destroyed   count   0 ====

curl output

[vagrant@master ~]$ curl -v http://google.com
* About to connect() to proxy 127.0.0.1 port 10086 (#0)
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 10086 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: google.com
> Accept: */*
> 
* Empty reply from server
* Connection #0 to host google.com left intact
curl: (52) Empty reply from server
ssrlive commented 3 years ago

server:

"protocol_param":"64#12345:abc12345,233:cba54321",

client1:

"protocol_param":"12345:abc12345",

client2:

"protocol_param":"233:cba54321",
ssrlive commented 3 years ago

I am no obligation to provide customized client support for a wide variety of VPN providers.

See #185 and here

uqix commented 3 years ago

@ssrlive it works on my cloud VPS but not my VM, I guess it's the complex network configuration of the VM that breaks SSR, anyway, thanks pal, you've done a great job here.

uqix commented 3 years ago

BTW, can we install ssr-client as a systemd service?

ssrlive commented 3 years ago

Any exec file can run as service, reference the install script.

https://github.com/ShadowsocksR-Live/shadowsocksr-native/blob/cdacdb9cc34b30f1339678941a3129a5a8bb5bd8/install/ssrn-install.sh#L493-L512