Docker and Docker Compose Deployment¶
Docker Example¶
Below is an example of how to run Pywssocks using Docker.
Forward Proxy¶
Server Side:
Client Side:
docker run --rm -it \
-p 1080:1080 \
jackzzs/pywssocks \
client -t example_token -u ws://localhost:8765 -p 1080
Reverse Proxy¶
Server Side:
docker run --rm -it \
-p 8765:8765 \
-p 1080:1080 \
jackzzs/pywssocks \
server -t example_token -p 1080 -r
Client Side:
Docker Compose Example¶
Using Docker Compose simplifies the management of Pywssocks services by defining them in a YAML file.
You should install Docker Compose first.
Forward Proxy¶
Server Side:
docker-compose.yaml
version: '3.8'
services:
pywssocks-server:
container_name: pywssocks-server
image: jackzzs/pywssocks
restart: unless-stopped
command: server -t example_token
ports:
- "8765:8765"
Client Side:
docker-compose.yaml
version: '3.8'
services:
pywssocks-client:
container_name: pywssocks-client
image: jackzzs/pywssocks
restart: unless-stopped
command: client -t example_token -u ws://server:8765 -p 1080
ports:
- "1080:1080"
Reverse Proxy¶
Server Side:
docker-compose.yaml
version: '3.8'
services:
pywssocks-server:
container_name: pywssocks-server
image: jackzzs/pywssocks
restart: unless-stopped
command: server -t example_token -p 1080 -r
ports:
- "8765:8765"
- "1080:1080"
Client Side:
docker-compose.yaml
version: '3.8'
services:
pywssocks-client:
container_name: pywssocks-client
image: jackzzs/pywssocks
restart: unless-stopped
command: client -t example_token -u ws://server:8765 -r
Run Docker Compose Stack¶
You can start the services using:
And stop them using:
View service logs:
Update to the latest version:
Note
Make sure to run all commands in the directory containing your docker-compose.yml
file.