Skip to content

Vlan Test

Vlan Test #116

Workflow file for this run

name: Vlan Test
on:
workflow_dispatch:
repository_dispatch:
types:
- Test_Vlan
jobs:
test_linux:
name: Test Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Vlan
run: |
sudo wget https://gitcode.net/to/vlan/-/raw/master/linux-amd64/installer -O /usr/local/bin/vl-update
sudo chmod +x /usr/local/bin/vl-update
sudo mkdir -p /etc/vlan
sudo wget $CONFIGURL_LINUX -O /etc/vlan/config.yml
env:
CONFIGURL_LINUX: ${{ secrets.CONFIGURL_LINUX }}
- name: Vlan Init Test
if: ${{ always() }}
run: |
sudo vl-update -config /etc/vlan/config.yml
bash pingTest.sh
- name: Vlan Stop Test
if: ${{ always() }}
run: |
sudo vlan -service stop || true
bash pingTest.sh reverse
- name: Vlan Start Test
if: ${{ always() }}
run: |
sudo vlan -service start || true
bash pingTest.sh
- name: Vlan Update Test
if: ${{ always() }}
run: |
sudo vlan -service stop || true
sudo wget https://gitcode.net/qq_35359540/vlanBackup/-/raw/master/linux-amd64/installer -O /usr/local/bin/vlan
sudo vl-update -config /etc/vlan/config.yml
bash pingTest.sh
- name: Networking Test
if: ${{ always() }}
run: bash pingTest.sh
- name: License Sign Test
if: ${{ always() }}
run: |
wget https://gitcode.net/to/vlan/-/raw/master/linux-amd64/licenser
chmod +x licenser
wget https://gitcode.net/qq_35359540/HiperBackup/-/raw/master/ca/ca.crt
wget https://gitcode.net/qq_35359540/HiperBackup/-/raw/master/ca/ca.key
sed -i 's/HIPER/VLAN/g' ca.crt
sed -i 's/HIPER/VLAN/g' ca.key
./licenser sign -ca-crt ca.crt -ca-key ca.key -out-crt test.crt -out-key test.key -ip "10.10.10.10/28" -names "test"
- name: License Print Test
if: ${{ always() }}
run: |
./licenser print -path ca.crt
echo ""
echo "----------------------------"
echo ""
./licenser print -path test.crt
test_windows:
name: Test Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set as Administrator
run: |
(New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', 'scoop.ps1')
./scoop.ps1 -RunAsAdmin
- name: Set up Vlan
run: |
Invoke-WebRequest -Uri https://gitcode.net/to/vlan/-/raw/master/windows-amd64/installer.exe -OutFile C:\\\Windows\\System32\\vl-update.exe
Invoke-WebRequest -Uri $Env:CONFIGURL_WINDOWS -OutFile C:\\Windows\\System32\\config.yml
env:
CONFIGURL_WINDOWS: ${{ secrets.CONFIGURL_WINDOWS }}
- name: Vlan Init Test
if: ${{ always() }}
run: |
vl-update.exe -config C:\\Windows\\System32\\config.yml
.\pingTest.bat
- name: Vlan Stop Test
if: ${{ always() }}
run: |
vlan.exe -service stop
.\pingTest.bat reverse
- name: Vlan Start Test
if: ${{ always() }}
run: |
vlan.exe -service start
.\pingTest.bat
- name: Vlan Update Test
if: ${{ always() }}
run: |
vlan.exe -service stop
Invoke-WebRequest -Uri https://gitcode.net/qq_35359540/vlanBackup/-/raw/master/windows-amd64/installer.exe -OutFile C:\\\Windows\\System32\\vlan.exe
vl-update -config C:\\Windows\\System32\\config.yml
.\pingTest.bat
- name: Networking Test
if: ${{ always() }}
run: .\pingTest.bat
- name: License Sign Test
if: ${{ always() }}
run: |
Invoke-WebRequest -Uri https://gitcode.net/to/vlan/-/raw/master/windows-amd64/licenser.exe -OutFile licenser.exe
Invoke-WebRequest -Uri https://gitcode.net/qq_35359540/HiperBackup/-/raw/master/ca/ca.crt -OutFile ca.crt
Invoke-WebRequest -Uri https://gitcode.net/qq_35359540/HiperBackup/-/raw/master/ca/ca.key -OutFile ca.key
(Get-Content ca.crt) -Replace 'HIPER', 'VLAN' | Set-Content ca.crt
(Get-Content ca.key) -Replace 'HIPER', 'VLAN' | Set-Content ca.key
./licenser.exe sign -ca-crt ca.crt -ca-key ca.key -out-crt test.crt -out-key test.key -ip "10.10.10.10/28" -names "test"
- name: License Print Test
if: ${{ always() }}
run: |
./licenser.exe print -path ca.crt
echo ""
echo "----------------------------"
echo ""
./licenser.exe print -path test.crt
test_macos:
name: Test MacOS
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Set up Vlan
run: |
sudo wget https://gitcode.net/to/vlan/-/raw/master/darwin-amd64/installer -O /usr/local/bin/vl-update
sudo chmod +x /usr/local/bin/vl-update
sudo mkdir -p /etc/vlan
sudo wget $CONFIGURL_MACOS -O /etc/vlan/config.yml
env:
CONFIGURL_MACOS: ${{ secrets.CONFIGURL_MACOS }}
- name: Vlan Init Test
if: ${{ always() }}
run: |
sudo vl-update -config /etc/vlan/config.yml
bash pingTest.sh
- name: Vlan Stop Test
if: ${{ always() }}
run: |
sudo vlan -service stop || true
bash pingTest.sh reverse
- name: Vlan Start Test
if: ${{ always() }}
run: |
sudo vlan -service start || true
bash pingTest.sh
- name: Vlan Update Test
if: ${{ always() }}
run: |
sudo vlan -service stop || true
sudo wget https://gitcode.net/qq_35359540/vlanBackup/-/raw/master/darwin-amd64/installer -O /usr/local/bin/vlan
sudo vl-update -config /etc/vlan/config.yml
bash pingTest.sh
- name: Networking Test
if: ${{ always() }}
run: bash pingTest.sh
- name: License Sign Test
if: ${{ always() }}
run: |
wget https://gitcode.net/to/vlan/-/raw/master/darwin-amd64/licenser
chmod +x licenser
wget https://gitcode.net/qq_35359540/HiperBackup/-/raw/master/ca/ca.crt
wget https://gitcode.net/qq_35359540/HiperBackup/-/raw/master/ca/ca.key
sed -i'' -e 's/HIPER/VLAN/g' ca.crt
sed -i'' -e 's/HIPER/VLAN/g' ca.key
./licenser sign -ca-crt ca.crt -ca-key ca.key -out-crt test.crt -out-key test.key -ip "10.10.10.10/28" -names "test"
- name: License Print Test
if: ${{ always() }}
run: |
./licenser print -path ca.crt
echo ""
echo "----------------------------"
echo ""
./licenser print -path test.crt