Comments (5)
Would you mind trying with an official release ? If you are using the head, I am not sure I haven't broken anything yet.
Also check the log of the server, it is the handshake with the server that is failling. It returns a HTTP 400 bad request. The start of the tproxy server is going fine
from wstunnel.
Server log: (remote="192.168.12.1:8888" !)
wstunnel --version
wstunnel 9.6.1
2024-07-31T19:29:59.685105Z INFO tunnel{peer="[::ffff:156.221.44.121]:5206" id="01910a45-4d45-7a55-bdc1-d382c1cf9354" remote="192.168.12.1:8888"}:http_proxy: wstunnel::protocols::tcp::server: Connecting to http proxy <PROXY_IP>:47598
2024-07-31T19:29:59.685112Z INFO tunnel{peer="[::ffff:156.221.44.121]:5206" id="01910a45-4d45-7a55-bdc1-d382c1cf9354" remote="192.168.12.1:8888"}:http_proxy: wstunnel::protocols::tcp::server: Opening TCP connection to <PROXY_IP>:47598
2024-07-31T19:29:59.765952Z INFO wstunnel::tunnel::server: Accepting connection
2024-07-31T19:29:59.766008Z INFO tunnel{peer="[::ffff:156.221.44.121]:16832"}: wstunnel::tunnel::server: Doing TLS handshake
2024-07-31T19:30:00.715559Z ERROR tunnel{peer="[::ffff:156.221.44.121]:5210"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Shutdown, Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2024-07-31T19:30:00.715735Z ERROR tunnel{peer="[::ffff:156.221.44.121]:16822" id="01910a45-379c-74e0-9ddf-13c68963acec" remote="192.168.12.1:8888"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Io, Custom { kind: UnexpectedEof, error: "peer closed connection without sending TLS close_notify: https://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof" })
2024-07-31T19:30:00.715781Z ERROR tunnel{peer="[::ffff:156.221.44.121]:5208"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Shutdown, Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2024-07-31T19:30:00.716103Z ERROR tunnel{peer="[::ffff:156.221.44.121]:16824" id="01910a45-39ee-7438-8326-176c18493d7b" remote="192.168.12.1:8888"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Io, Custom { kind: UnexpectedEof, error: "peer closed connection without sending TLS close_notify: https://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof" })
2024-07-31T19:30:00.716569Z ERROR tunnel{peer="[::ffff:156.221.44.121]:5206" id="01910a45-4d45-7a55-bdc1-d382c1cf9354" remote="192.168.12.1:8888"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Io, Custom { kind: UnexpectedEof, error: "peer closed connection without sending TLS close_notify: https://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof" })
2024-07-31T19:30:00.716897Z ERROR tunnel{peer="[::ffff:156.221.44.121]:16832"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Shutdown, Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2024-07-31T19:30:00.717130Z ERROR tunnel{peer="[::ffff:156.221.44.121]:16830"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Shutdown, Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2024-07-31T19:30:00.717282Z ERROR tunnel{peer="[::ffff:156.221.44.121]:5202" id="01910a45-3d80-7263-84e9-c5f318bbe7a3" remote="192.168.12.1:8888"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Io, Custom { kind: UnexpectedEof, error: "peer closed connection without sending TLS close_notify: https://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof" })
2024-07-31T19:30:00.717766Z ERROR tunnel{peer="[::ffff:156.221.44.121]:16826" id="01910a45-497f-75ac-bf27-03b1c10ccd6d" remote="192.168.12.1:8888"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Io, Custom { kind: UnexpectedEof, error: "peer closed connection without sending TLS close_notify: https://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof" })
2024-07-31T19:30:00.717927Z ERROR tunnel{peer="[::ffff:156.221.44.121]:16828"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Shutdown, Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2024-07-31T19:30:00.718197Z ERROR tunnel{peer="[::ffff:156.221.44.121]:5204" id="01910a45-3a4c-7015-a9f6-aa94ee650d89" remote="192.168.12.1:8888"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Io, Custom { kind: UnexpectedEof, error: "peer closed connection without sending TLS close_notify: https://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof" })
2024-07-31T19:30:00.718788Z ERROR tunnel{peer="[::ffff:156.221.44.121]:5212"}: wstunnel::tunnel::server: Error while upgrading cnx: hyper::Error(Shutdown, Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
Client logs:
wstunnel --version
wstunnel 9.6.1
2024-07-31T19:29:54.916002Z ERROR tunnel{id="01910a45-1371-74f8-8834-b5b392ec49c4" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:55.487627Z ERROR tunnel{id="01910a45-15a4-7e38-b793-182a0a8d2bf5" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:55.568764Z ERROR tunnel{id="01910a45-15ff-7ccd-bed1-3bc5ac9d51cd" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:55.584584Z INFO wstunnel::tcp: Opening TCP connection to <VPS_IP>:443
2024-07-31T19:29:55.667643Z INFO wstunnel::tls: Doing TLS handshake using SNI IpAddress(V4(Ipv4Addr([95, 179, 239, 127]))) with the server <VPS_IP>:443
2024-07-31T19:29:55.688959Z ERROR tunnel{id="01910a45-166c-7066-832d-afcc6bfd4e22" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:56.210037Z ERROR tunnel{id="01910a45-1876-7fbc-8b28-f1754cb58fc8" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:56.213534Z ERROR tunnel{id="01910a45-1881-70a3-900b-d0486ebc6d9f" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:56.226954Z ERROR tunnel{id="01910a45-1890-7d16-854f-5ad376bbe751" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:56.236963Z ERROR tunnel{id="01910a45-1895-7315-acf3-d911423ea988" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:56.241477Z ERROR tunnel{id="01910a45-1897-718f-859f-4cb44990dad6" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:56.246188Z ERROR tunnel{id="01910a45-18a4-72a9-bf95-74073d5ff08f" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:56.516829Z ERROR tunnel{id="01910a45-19b6-7a14-8413-8431c63f73a1" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:56.799520Z ERROR tunnel{id="01910a45-1ac1-7d48-a21d-a248f7e06df2" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.039271Z ERROR tunnel{id="01910a45-1fa4-7296-9ba6-b072ba682829" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.065510Z ERROR tunnel{id="01910a45-1fc0-7094-9f55-b391fbcd3ce9" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.231769Z ERROR tunnel{id="01910a45-2064-7f1f-bd2c-a0344eccbf25" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.234439Z ERROR tunnel{id="01910a45-2066-77a2-8bc9-d8d5b7bdda66" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.235716Z ERROR tunnel{id="01910a45-2064-77fc-b276-1d32758186ba" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.553052Z ERROR tunnel{id="01910a45-21a8-7576-b907-b845d7c5677e" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.557182Z ERROR tunnel{id="01910a45-21aa-748a-8441-8e1a36e331e9" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.561742Z ERROR tunnel{id="01910a45-21ad-72f6-b2b8-02d41adba928" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.562697Z ERROR tunnel{id="01910a45-21af-7da2-a553-27f141418055" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.564179Z ERROR tunnel{id="01910a45-21b1-7129-a1c7-4bc6a4e5d237" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.585436Z ERROR tunnel{id="01910a45-21c7-7d6b-85d5-60aa5256aa5f" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.655904Z INFO wstunnel::tcp: Opening TCP connection to <VPS_IP>:443
2024-07-31T19:29:58.725210Z ERROR tunnel{id="01910a45-2206-746f-a3a9-698d62eb30f5" remote="192.168.12.1:8888"}: wstunnel::tunnel::client: failed to do websocket handshake with the server wss://<VPS_IP>:443
Caused by:
Invalid status code: 400
2024-07-31T19:29:58.740607Z INFO wstunnel::tls: Doing TLS handshake using SNI IpAddress(V4(Ipv4Addr([95, 179, 239, 127]))) with the server <VPS_IP>:443
2024-07-31T19:29:59.622055Z INFO wstunnel::tcp: Opening TCP connection to <VPS_IP>:443
2024-07-31T19:29:59.704394Z INFO wstunnel::tls: Doing TLS handshake using SNI IpAddress(V4(Ipv4Addr([95, 179, 239, 127]))) with the server <VPS_IP>:443
from wstunnel.
Strange it seems the connection breaks server side before it has any chance to do the websocket upgrade. Meaning, something cut the connection before the server received the data.
Would you mind sharing the log of the server with --log-lvl=trace
?
Also if your server is not behind a reverse proxy, try to use http2 directly. On client side replace wss://<VPS_IP>:443
by https://<VPS_IP>:443
from wstunnel.
Server:
wstunnel --log-lvl=trace server https://[::]:443 -p "http://$PROXY_USER:$PROXY_PASS@$PROXY_IP:$PROXY_PORT"
wstunnel_log.txt
Client:
sudo wstunnel client -L tproxy+tcp://0.0.0.0:8888 --connection-min-idle 6 https://<VPS_IP>:443
wstunnel_client_log.txt
from wstunnel.
You are not doing any connection/tunnel on client side now 🙈 You need to initiate a connection on the tproxy server. As you set --connection-min-idle 6
the client is only doing tcp + tls connection to the server and is waiting for an incoming tunnel to go further. (Everything seem ok at this lvl from the logs)
Remove --connection-min-idle 6
on the client to debug and start a connection on your tproxy server
from wstunnel.
Related Issues (20)
- test
- fsdfdsfdfsdf
- test HOT 1
- [Feature Request] Add Authentication Support for SOCKS Service in wstunnel Client HOT 12
- Auto-generate remote port HOT 1
- Need help to setup for android HOT 1
- Need help for android HOT 7
- Binding Apache with wstunnel server HOT 2
- Please increase version support for the Openwrt system platform in wstunnel. HOT 1
- I want to add static route in android HOT 4
- panic (core dumped) (version 9.7.3) HOT 5
- Verify the settings HOT 1
- How Add login/password support?? HOT 5
- How to use custom tls certificate private-key HOT 6
- Forward Traffic to Another HTTP Proxy HOT 8
- Forward Traffic to Another HTTP Proxy with Authentication Using wstunnel HOT 1
- Under openwrt program do not run in background without nohup. HOT 1
- wstunnel::tunnel::server: error while decoding jwt for tunnel info Err(Error(InvalidToken)) header None HOT 1
- wstunnel::tunnel::server: error while decoding jwt for tunnel info Err(Error(InvalidToken)) header None HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wstunnel.