Skip to content

chore: update action version #60

chore: update action version

chore: update action version #60

Workflow file for this run

name: Run sidecar test
on:
push:
branches:
- master
jobs:
test:
name: Run sidecar test
env:
SERVER: ${{secrets.server}}
COMPLEXPATH: ${{secrets.complexpath}}
CUSTOMHEADERNAME: ${{secrets.customheadername}}
CUSTOMHEADERVALUE: ${{secrets.customheadervalue}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Download module
run: go mod download
- name: Write config.toml
run: |
cd cmd/sidecar/
cat << EOF > config.toml
[Client]
ProxyPort = 4396
OnlyListenIPv4 = true
RunAsDaemon = true
WorkDir = ""
PriKeyPath = ""
CertPath = ""
LogLevel = "info"
GfwListUrl = "https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt"
[[Client.RemoteServers]]
Host = "$SERVER"
ComplexPath = "$COMPLEXPATH"
[Client.RemoteServers.CustomHeaders]
$CUSTOMHEADERNAME = "$CUSTOMHEADERVALUE"
EOF
- name: Run sidecar client
run: |
cd cmd/sidecar/
go build -o sidecar main.go
./sidecar client -action start
- name: Check process info
run: |
# sleep 15s wait for server up
sleep 15
cat cmd/sidecar/sidecar.log
sudo netstat -nutlp
- name: Trust Cert
run: |
sudo cp cmd/sidecar/sidecar-client.crt /usr/local/share/ca-certificates/sidecar.crt
sudo update-ca-certificates
- name: Send Test request
run: |
curl -v -I -x 127.0.0.1:4396 https://www.google.com