PacketStream integration
Using PacketStream residential proxies with Wget
Download through PacketStream with Wget using a local TLS bridge, a private credential file, and a residential-exit check.
Use Wget when a shell script needs to download a file through a residential exit. This setup keeps the auth key out of command arguments and encrypts the proxy hop with a local TLS bridge.
Configure
GNU Wget does not make a TLS connection to an HTTPS proxy. Install socat with your operating system’s package manager, then start this loopback-only TLS bridge in its own terminal:
socat 'TCP4-LISTEN:31110,bind=127.0.0.1,reuseaddr,fork' \
'OPENSSL:proxy.packetstream.io:31111,verify=1,commonname=proxy.packetstream.io'
Keep the bridge running while Wget uses it, then stop it with Ctrl+C. If local port 31110 is already in use, replace 31110 with the same unused loopback port in both the TCP4-LISTEN value above and the Wget configuration below.
Put the local bridge and PacketStream credentials in a private Wget configuration file:
use_proxy = on
http_proxy = http://127.0.0.1:31110
https_proxy = http://127.0.0.1:31110
proxy_user = your_username
proxy_password = your_auth_key
Save it outside your project, restrict its file permissions, and pass it explicitly:
chmod 600 "$HOME/.wgetrc-packetstream"
wget --config="$HOME/.wgetrc-packetstream" --quiet --output-document=- 'https://ipinfo.io'
Wget sends plaintext only to the local loopback bridge. socat verifies the gateway certificate and carries that traffic to proxy.packetstream.io:31111 over TLS. GNU Wget does not provide a standard SOCKS5 configuration.
Verify your exit
The command prints the ipinfo.io JSON response. Inspect its ip and country fields before using the same configuration for a download.
Country targeting and sticky sessions
Change only the proxy_password value in the private configuration file:
proxy_password = your_auth_key_country-US_session-download42
The _country-US suffix requests a United States exit. The _session-download42 suffix keeps the related workflow on one exit while the sticky session remains available.
Troubleshooting
- Keep the loopback bridge running and leave certificate verification enabled.
- Use the loopback port selected above (
31110by default) in Wget. The bridge, not Wget, makes the TLS connection to port31111. - Check that another Wget configuration is not replacing the proxy settings. Avoid command-line password flags because expanded arguments can appear in process listings.
See proxy troubleshooting for endpoint, authentication, TLS, and timeout checks.