@@ -159,18 +159,18 @@ jobs:
159159 curl -sf http://127.0.0.1:18080/ip
160160 echo "--- Local HTTP server ready ---"
161161
162- - name : Start SOCKS5 test server
162+ - name : Build and start SOCKS5 test server (microsocks)
163163 run : |
164- docker run -d --name socks5-server --network host \
165- -e PROXY_PORT=11080 \
166- serjs/go-socks5-proxy:latest
167- sleep 2
168- docker logs socks5-server
164+ git clone --depth 1 https://github.com/rofl0r/microsocks.git /tmp/microsocks
165+ cd /tmp/microsocks && make -j"$(nproc)"
166+ /tmp/microsocks/microsocks -p 11080 &
167+ sleep 1
169168 echo "--- Verify SOCKS5 server directly ---"
170169 curl -sf --socks5-hostname 127.0.0.1:11080 http://127.0.0.1:18080/ip || {
171170 echo "ERROR: SOCKS5 server not working"
172171 exit 1
173172 }
173+ echo "--- SOCKS5 server OK ---"
174174
175175 - name : Create Squid config for SOCKS5 peer
176176 run : |
@@ -248,7 +248,6 @@ jobs:
248248 run : |
249249 mkdir -p /tmp/test-logs
250250 docker logs squid-test > /tmp/test-logs/squid.log 2>&1 || true
251- docker logs socks5-server > /tmp/test-logs/socks5.log 2>&1 || true
252251 cp /tmp/squid-conf/squid.conf /tmp/test-logs/ 2>/dev/null || true
253252 cp /tmp/proxy-response.txt /tmp/test-logs/ 2>/dev/null || true
254253 cp /tmp/proxy-stderr.txt /tmp/test-logs/ 2>/dev/null || true
@@ -264,7 +263,8 @@ jobs:
264263 - name : Cleanup
265264 if : always()
266265 run : |
267- docker rm -f squid-test socks5-server 2>/dev/null || true
266+ docker rm -f squid-test 2>/dev/null || true
267+ pkill microsocks 2>/dev/null || true
268268 kill %1 2>/dev/null || true
269269
270270 # ------------------------------------------------------------------
@@ -295,20 +295,20 @@ jobs:
295295 sleep 1
296296 curl -sf http://127.0.0.1:18081/ip
297297
298- - name : Start SOCKS5 server with auth
298+ - name : Build and start SOCKS5 server with auth (microsocks)
299299 run : |
300- docker run -d --name socks5-auth --network host \
301- -e PROXY_PORT=11081 \
302- -e PROXY_USER=testuser \
303- -e PROXY_PASSWORD=testpass \
304- serjs/go-socks5-proxy:latest
305- sleep 2
306- docker logs socks5-auth
300+ if [ ! -f /tmp/microsocks/microsocks ]; then
301+ git clone --depth 1 https://github.com/rofl0r/microsocks.git /tmp/microsocks
302+ cd /tmp/microsocks && make -j"$(nproc)"
303+ fi
304+ /tmp/microsocks/microsocks -u testuser -P testpass -p 11081 &
305+ sleep 1
307306 echo "--- Verify SOCKS5 auth server directly ---"
308307 curl -sf --socks5-hostname testuser:testpass@127.0.0.1:11081 http://127.0.0.1:18081/ip || {
309308 echo "ERROR: SOCKS5 auth server not working"
310309 exit 1
311310 }
311+ echo "--- SOCKS5 auth server OK ---"
312312
313313 - name : Create Squid config with SOCKS5 auth
314314 run : |
@@ -384,7 +384,6 @@ jobs:
384384 run : |
385385 mkdir -p /tmp/test-logs-auth
386386 docker logs squid-auth > /tmp/test-logs-auth/squid.log 2>&1 || true
387- docker logs socks5-auth > /tmp/test-logs-auth/socks5.log 2>&1 || true
388387 cp /tmp/squid-conf-auth/squid.conf /tmp/test-logs-auth/ 2>/dev/null || true
389388 cp /tmp/proxy-response.txt /tmp/test-logs-auth/ 2>/dev/null || true
390389 cp /tmp/proxy-stderr.txt /tmp/test-logs-auth/ 2>/dev/null || true
@@ -400,7 +399,8 @@ jobs:
400399 - name : Cleanup
401400 if : always()
402401 run : |
403- docker rm -f squid-auth socks5-auth 2>/dev/null || true
402+ docker rm -f squid-auth 2>/dev/null || true
403+ pkill microsocks 2>/dev/null || true
404404 kill %1 2>/dev/null || true
405405
406406 # ------------------------------------------------------------------
0 commit comments