Shadowsocks stopped working after switching networks: test the port first
By Daniel Brooks Published 12 min read
On this page (12 sections)
- The short version
- A network change can break Shadowsocks without changing your client
- Shadowsocks stopped working after switching networks: test the port first
- Read refusal, timeout and success as different results
- Move the server and client to a port the network allows
- Check the server address, DNS resolver and firewall
- Check UDP relay and DNS through the Shadowsocks tunnel
- Check the server process, address and firewall before replacing the profile
- Read the client log for bind, route and handshake errors
- Use transport plugins when ordinary 443 traffic is blocked
- Mobile networks add tethering, NAT and address-family checks
- Questions people still ask
In short: Shadowsocks stopped working after switching networks usually means the new network cannot reach the configured port, address or DNS name. Test one TCP connection to the configured port first. A refused result means something on that path answered with a reset, usually because nothing listens there. Verify the port and server process before blaming a filter. A timeout can fit a blocked address, dead server, wrong port or local conflict. A successful test moves you to DNS, UDP, firewall and client checks.
Part of our guide on windows 11 vpn connection issues
| First test | one TCP connection to the configured server port |
|---|---|
| Refused | something answered with a reset; verify port and service |
| Timeout | no answer arrived before the test ended |
| Success | check DNS, UDP, firewall and client logs |
| Fallback ports | 443 or 80, only when the server listens there |
| Change order | port, server address, then transport settings |
The short version
- Run one TCP port test before changing any Shadowsocks setting.
- A refusal usually means a wrong port or stopped server process. An inline device can also send the reset.
- If the server uses port 8388 and the test is refused, a web-only network may be rejecting that port.
- A timeout requires checks for the address, server, firewall and client route.
- Change the port on both server and client. Add a second server address only after testing the current one.
- Check UDP relay and DNS settings when TCP works but apps still fail.
A network change can break Shadowsocks without changing your client
Your Shadowsocks client sends the same request, but each network handles outbound traffic differently. Home routers often allow many ports, while offices, hotels and campuses can limit traffic to common web ports.
The new network can also require a browser sign-in before outside connections work. Mobile paths add carrier-grade NAT, changing address handling without giving you a public inbound address.
Start with the configured server address and port. The useful question is which layer failed: TCP access, DNS, UDP relay, the server, or your device.
Keep the old network available if possible. A comparison between networks gives you a control test instead of a guess. We go through diagnosing private relay problems on one wifi step by step elsewhere on the site.
Shadowsocks stopped working after switching networks: test the port first
Copy the server address and port from your client profile. Close Shadowsocks before testing, so a local proxy or firewall rule cannot confuse the result.
On macOS or Linux, run nc -vz server.address port. On Windows PowerShell, run Test-NetConnection server.address -Port port. Replace both placeholders with your own values.
A successful result means the TCP handshake completed. A refusal means something on the path answered with a reset. A timeout means the test received no answer before it ended. People in this spot often ask about pinpoint mobile VPN bottlenecks as well.
Record the exact result and the address tested. Run the same command on the old network when you can, then compare the two readings.
- Open Terminal or PowerShell.
- Copy the server address and port from the client profile.
- Run the matching TCP command.
- Record success, refusal or timeout.
- Repeat on the old network if it is available.
- Takes seconds
- Separates TCP access from client errors
- Works without changing the profile
- Needs the configured address and port
- Does not test UDP relay or the full proxy handshake
Read refusal, timeout and success as different results
A refusal means something on that path answered with a reset. Usually, nothing listens on the tested port, so verify the port and confirm the Shadowsocks server process is running before blaming a filter.
An inline device can also send the reset. That is the one case where a filtered port produces a refusal, so compare the same test on another network before deciding. Before you commit to anything, it is worth looking at using VPNs to unblock streaming.
If your server uses the Shadowsocks default port 8388 and the test comes back refused, that fits a network that only lets web ports out. It also fits a stopped service or a server using another port.
A timeout leaves several possibilities: the address is blocked, the server is down, the port is wrong, or a firewall drops the packets. Check each side instead of treating the reading as proof of one cause.
| Reading | What it means | Next move |
|---|---|---|
| Succeeded | The address accepted a TCP connection on that port | Check DNS, UDP, firewall and client settings |
| Connection refused | Something answered with a reset | Verify the port and server process first |
| Timeout | No answer arrived before the test ended | Check address, server, firewalls and network path |
A refused port needs a server check before a network check
Open the server configuration and confirm its listening port. Check the service status and its recent log for a startup or bind error. Before you commit to anything, it is worth looking at content filters without admin rights.
Confirm the server firewall allows the same port and protocol. A cloud firewall, host firewall or router rule can reject or drop traffic before Shadowsocks receives it.
Only after those checks should you compare another network. A refusal that appears only on the new network supports port filtering, while a refusal everywhere points back to the server setup.
Move the server and client to a port the network allows
Use port 443 or 80 only when you control the server and can make Shadowsocks listen there. Web-only networks often permit those ports, but they can still inspect or block encrypted proxy traffic. People in this spot often ask about legitimate windows license without subscription as well.
Change the listening port on the server, restart the service, and confirm it is listening. Then change the port in the client and reconnect.
A client-only change points at a door the server never opened. A server-only change leaves the client knocking on the old door.
Run the TCP test again after both sides match. Keep the old profile until the new port works, so you can return without rebuilding the configuration.
- Server side: change the listening port and restart the Shadowsocks service.
- Server firewall: allow the new TCP port, and allow UDP if relay needs it.
- Client side: change the server port to the same value.
- Test the new port before starting more troubleshooting.
- Keep the old port and profile in a note.
- Can pass networks that reject unusual ports
- Keeps the existing server identity
- Needs server access
- May require firewall and service changes
Check the server address, DNS resolver and firewall
A reachable port does not prove the hostname is correct. Compare the address in the client with the current server address, especially after a migration or DNS change.
nslookup your.hostname queries the DNS server it selects, which may not be the resolver your client uses. Run nslookup your.hostname 1.1.1.1 and compare both answers. A difference points at the selected resolver rather than the hostname itself.
On macOS or Linux, dig your.hostname shows the system-selected resolver. Run dig @1.1.1.1 your.hostname beside it. Use the address returned by each query for separate port tests.
A hardcoded address bypasses DNS for a test. It does not fix a blocked address, and it can become stale when the server address changes.
- Compare the client hostname with the server's current address.
- Query the selected resolver and 1.1.1.1 separately.
- Test each returned address on the configured port.
- Check cloud, host and local firewall rules.
- Restore the hostname after testing if its address is current.
Check UDP relay and DNS through the Shadowsocks tunnel
Shadowsocks can carry TCP and UDP separately. A network may pass the TCP connection while dropping UDP, leaving some apps working and others failing.
Check the client's UDP relay setting and the server's UDP support. Confirm the server firewall allows UDP on the configured port, not only TCP.
DNS can fail in the same way. If the client sends DNS outside the tunnel, the new network may rewrite or block those queries. If it sends DNS through the tunnel, a broken UDP path can make lookups hang.
Compare a browser lookup with a command-line lookup while the proxy is active. Test one application with UDP disabled if the client offers that option. A change in behaviour identifies the transport involved.
- Confirm UDP relay is enabled where your setup needs it.
- Allow UDP on the server and cloud firewall.
- Check whether client DNS goes through the tunnel.
- Compare an app with UDP enabled and disabled.
- Test DNS while the proxy is connected.
Check the server process, address and firewall before replacing the profile
Test a second server address from the same provider when one address times out. Use the same port and network, then compare the readings.
One address failing while another works points toward the address or its route. Every address failing points toward the network, server account, firewall or device.
Check the server process from the server itself. Confirm it is running, listening on the expected address, and writing current connection attempts to its log.
A host firewall can allow TCP from one address range and drop it from another. Cloud security groups can apply a similar rule. Review both rules after changing networks.
- Address issue: one address fails while another works on the same port.
- Dead service: the same port fails from every network.
- Firewall issue: the service runs, but permitted source ranges exclude the new path.
- Wrong port: the client port differs from the server listener.
- Client issue: the port test works, but no connection reaches the client or server log.
Read the client log for bind, route and handshake errors
Open the client log while making one connection attempt. Note the timestamp, destination address, local proxy port and error text.
A bind error means another process already owns the local listening port. Close that program or choose an unused local port, then restart the client.
A route or connection timeout means the client tried to reach the destination but received no answer. Compare it with the standalone port test.
A handshake, authentication or cipher error means TCP reached the server. Check the password, method, plugin settings and server profile instead of changing networks again.
No connection attempt in the log means the application may use the wrong proxy mode or local port. Test the local proxy with a browser or command-line request.
- Bind error: find and close the process using the local port.
- Route error: compare the destination with the port test.
- Handshake error: verify password, method and plugin settings.
- No attempt: check application proxy mode and local port.
- Timestamp every test so log lines match the attempt.
Use transport plugins when ordinary 443 traffic is blocked
Some networks allow TCP 443 but still identify and reject Shadowsocks traffic. A successful port test cannot rule out inspection after the handshake begins.
If your server and client support it, configure a transport plugin such as simple-obfs or v2ray-plugin. The plugin settings must match on both sides, including the mode and any host or path values.
Test the plugin on the same port after verifying the server process and firewall. Do not add a plugin while the plain port is still unreachable, because two failures become harder to separate.
A plugin is not a guarantee against every policy. Follow the network rules where you are, and keep a plain profile for comparison when permitted.
- Confirm plain TCP reaches the server first.
- Install the same supported plugin on server and client.
- Match plugin mode and required host or path values.
- Restart both sides and read the client log.
- Compare the result with the plain profile.
Mobile networks add tethering, NAT and address-family checks
A phone may work on its own mobile data while a tethered laptop fails. Tethering adds another router, local firewall and DNS layer between the laptop and carrier network.
Test Shadowsocks directly on the phone, then test the same profile through the phone's hotspot. A difference points toward tethering rules or the laptop rather than the server.
Carrier-grade NAT gives many customers shared public addresses. It usually does not prevent outbound connections, but it can affect address reputation, filtering and return-path behaviour.
Try IPv4 and IPv6 separately when the carrier offers both. A hostname can return an address family the laptop cannot use, while an explicit address can show which path fails.
Mobile networks can also change addresses during movement or radio handoffs. Repeat the port test after reconnecting, and record whether the destination address changed.
- Compare phone data with phone hotspot results.
- Check the laptop's DNS and local firewall during tethering.
- Test IPv4 and IPv6 separately when both exist.
- Record address changes after reconnecting.
- Check whether UDP behaves differently from TCP.
Test the configured port first. Verify the server process after a refusal, then check the address, DNS, firewalls, UDP and client log. Change the port on both sides before adding a second address or transport plugin.
Questions people still ask
Does Shadowsocks fail on public Wi-Fi for a different reason than on my home network?
The failure can occur at the same layer, but guest Wi-Fi adds a sign-in portal, DNS rules and short sessions. Run the browser sign-in first, then compare the port result.
Can I fix this without changing my server?
Yes, if the configured port works and the fault is DNS, UDP, firewall or the client. A blocked port needs a server listener on an allowed port, unless another profile already provides one.
How do I know whether a refusal means filtering?
Start with the port and server process. A refusal usually means nothing listens on that port. An inline device can send the reset, so compare the same test from another network.
How do I tell DNS failure from a dead server?
Query the hostname with the selected resolver and with 1.1.1.1. Test the returned address directly. A failed name lookup points to DNS, while a resolved address that times out needs server, firewall and route checks.
Why does TCP work while some apps still fail?
The app may need UDP relay or tunnel DNS. Check UDP settings, server and cloud firewall rules, then compare behaviour with UDP disabled.
Why did it work again after reconnecting to the same network?
The network may have refreshed a captive-portal session, lease, route or mobile address. Record the new address and rerun the port test before changing the profile.