mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-04-29 19:01:42 +02:00

* fix: must close the connection after processing I think it should help to close #80 * feat: migration to github.com/things-go/go-socks5 - preallocate config slices - not used interfaces in consumer - do not allocate new variables in loops * feat: close connection after full processing * feat: correct process sigint signal * feat: improve build system * fix: http proxy * feat: update golangci-lint-action to v3.7.0 * feat: correct process routines * fix: close http conn correctly * feat: update golangci-lint-action to v4 * fix: goreleaser used clean now
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: Test
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
name: Test wireproxy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setting up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.21"
|
|
- name: Install dependencies
|
|
run: sudo apt install wireguard curl
|
|
- name: Building wireproxy
|
|
run: |
|
|
git tag dev
|
|
make
|
|
- name: Generate test config
|
|
run: ./test_config.sh
|
|
- name: Start wireproxy
|
|
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 http://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: |
|
|
set +e
|
|
curl -s --fail --proxy http://peter:wrongpass@localhost:64425 http://zx2c4.com/ip
|
|
if [[ $? == 0 ]]; then exit 1; fi
|