support 302 redirect
Author: wukan1986Created Dec 14, 2025Updated Dec 14, 2025
Labelsenhancement
Describe the feature
support 302 redirect
Describe the reason for such feature
my server IP and port change frequently, so I have to update 302 redirect using Cloudflare Rules by webhook, If wstunnel supports the redirect feature, it can auto reconnect to the new port after the port changes.
# Server is behind NAT, maybe public port is 7123
./wstunnel server ws://0.0.0.0:7000
./wstunnel client -R tcp://0.0.0.0:7001:127.0.0.1:8080 ws://server2.com:8000when access ws://server2.com:8000, will redirect to ws://server1.com:7123
if port change to 8456, still access ws://server2.com:8000, it will redirect to ws://server1.com:8456
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Source: erebe/wstunnel