File tree Expand file tree Collapse file tree 4 files changed +34
-2
lines changed
Expand file tree Collapse file tree 4 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 1+ Dockerfile
Original file line number Diff line number Diff line change 1+ FROM golang
2+ WORKDIR /app
3+ COPY . .
4+ WORKDIR /app/client
5+ RUN go build -o app .
6+ WORKDIR /app/server
7+ RUN go build -o app .
8+ WORKDIR /app
9+ RUN chmod +x start.sh
10+ EXPOSE 80 1180
11+ CMD ["/app/start.sh" ]
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ A lightweight proxy tool based on the WebSocket protocol
88``` shell
99git clone github.com/golangboy/wsproxy
1010```
11-
1211## Client
1312``` shell
1413cd client
@@ -38,7 +37,20 @@ Usage of ./server:
3837 listen address (default " :80" )
3938
4039```
41-
40+ # 🐳 Docker
41+ ``` shell
42+ git clone github.com/golangboy/wsproxy
43+ cd wsproxy
44+ docker build -t wsproxy .
45+ ```
46+ #### client
47+ ``` shell
48+ docker run -itd -p 1180:1180 -e ws=your_server:80 wsproxy
49+ ```
50+ #### server
51+ ``` shell
52+ docker run -itd -p 80:80 wsproxy
53+ ```
4254# 🧑💻 How to use
4355## On server
4456``` shell
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if [ -z $ws ]; then
3+ echo " Starting server"
4+ /app/server/app
5+ else
6+ echo " Starting client"
7+ /app/client/app -ws=$ws
8+ fi
You can’t perform that action at this time.
0 commit comments