From 913319320e147173b4bb6f64b50b281a2577e52c Mon Sep 17 00:00:00 2001 From: octeep Date: Mon, 22 May 2023 17:18:54 +0100 Subject: [PATCH] add test case for http proxy --- .github/workflows/test.yml | 6 ++++++ test_config.sh | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c46d20..21ec1d0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,4 +29,10 @@ jobs: run: ./wireproxy -c test.conf & sleep 1 - name: Test socks5 run: curl --proxy socks5://localhost:64423 http://zx2c4.com/ip | grep -q "demo.wireguard.com" + - name: Test http + run: curl --proxy socks5://localhost:64424 http://zx2c4.com/ip | grep -q "demo.wireguard.com" + - name: Test http with password + run: curl --proxy http://peter:hunter123@localhost:64424 http://zx2c4.com/ip | grep -q "demo.wireguard.com" + - name: Test http with wrong password + run: ! curl --proxy http://peter:wrongpass@localhost:64424 http://zx2c4.com/ip diff --git a/test_config.sh b/test_config.sh index 3f439cd..ae18b12 100755 --- a/test_config.sh +++ b/test_config.sh @@ -17,4 +17,12 @@ Endpoint = demo.wireguard.com:$server_port [Socks5] BindAddress = 127.0.0.1:64423 + +[http] +BindAddress = 127.0.0.1:64424 + +[http] +BindAddress = 127.0.0.1:64425 +Username = peter +Password = hunter123 EOL