mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-19 21:39:09 +00:00
publish version 0.6.0
This commit is contained in:
parent
e3cc5ea1ce
commit
2ade72e79d
3 changed files with 15 additions and 4 deletions
6
.github/workflows/publish-exe.yml
vendored
6
.github/workflows/publish-exe.yml
vendored
|
@ -94,9 +94,9 @@ jobs:
|
||||||
if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then
|
if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then
|
||||||
powershell -Command "(Get-Item README.md).LastWriteTime = Get-Date"
|
powershell -Command "(Get-Item README.md).LastWriteTime = Get-Date"
|
||||||
powershell -Command "(Get-Item target/${{ matrix.target }}/release/wintun.dll).LastWriteTime = Get-Date"
|
powershell -Command "(Get-Item target/${{ matrix.target }}/release/wintun.dll).LastWriteTime = Get-Date"
|
||||||
powershell Compress-Archive -Path target/${{ matrix.target }}/release/tun2proxy-bin.exe, README.md, target/tun2proxy-ffi.h, target/${{ matrix.target }}/release/tun2proxy.dll, target/${{ matrix.target }}/release/wintun.dll -DestinationPath mypubdir4/tun2proxy-${{ matrix.target }}.zip
|
powershell Compress-Archive -Path target/${{ matrix.target }}/release/tun2proxy-bin.exe, target/${{ matrix.target }}/release/udpgw-server.exe, README.md, target/tun2proxy-ffi.h, target/${{ matrix.target }}/release/tun2proxy.dll, target/${{ matrix.target }}/release/wintun.dll -DestinationPath mypubdir4/tun2proxy-${{ matrix.target }}.zip
|
||||||
elif [[ "${{ matrix.host_os }}" == "macos-latest" ]]; then
|
elif [[ "${{ matrix.host_os }}" == "macos-latest" ]]; then
|
||||||
zip -j mypubdir4/tun2proxy-${{ matrix.target }}.zip target/${{ matrix.target }}/release/tun2proxy-bin README.md target/tun2proxy-ffi.h target/${{ matrix.target }}/release/libtun2proxy.dylib
|
zip -j mypubdir4/tun2proxy-${{ matrix.target }}.zip target/${{ matrix.target }}/release/tun2proxy-bin target/${{ matrix.target }}/release/udpgw-server README.md target/tun2proxy-ffi.h target/${{ matrix.target }}/release/libtun2proxy.dylib
|
||||||
if [[ "${{ matrix.target }}" == "x86_64-apple-darwin" ]]; then
|
if [[ "${{ matrix.target }}" == "x86_64-apple-darwin" ]]; then
|
||||||
./build-aarch64-apple-ios.sh
|
./build-aarch64-apple-ios.sh
|
||||||
zip -r mypubdir4/tun2proxy-aarch64-apple-ios-xcframework.zip ./tun2proxy.xcframework/
|
zip -r mypubdir4/tun2proxy-aarch64-apple-ios-xcframework.zip ./tun2proxy.xcframework/
|
||||||
|
@ -104,7 +104,7 @@ jobs:
|
||||||
zip -r mypubdir4/tun2proxy-apple-xcframework.zip ./tun2proxy.xcframework/
|
zip -r mypubdir4/tun2proxy-apple-xcframework.zip ./tun2proxy.xcframework/
|
||||||
fi
|
fi
|
||||||
elif [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
|
elif [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
|
||||||
zip -j mypubdir4/tun2proxy-${{ matrix.target }}.zip target/${{ matrix.target }}/release/tun2proxy-bin README.md target/tun2proxy-ffi.h target/${{ matrix.target }}/release/libtun2proxy.so
|
zip -j mypubdir4/tun2proxy-${{ matrix.target }}.zip target/${{ matrix.target }}/release/tun2proxy-bin target/${{ matrix.target }}/release/udpgw-server README.md target/tun2proxy-ffi.h target/${{ matrix.target }}/release/libtun2proxy.so
|
||||||
if [[ "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]]; then
|
if [[ "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]]; then
|
||||||
./build-android.sh
|
./build-android.sh
|
||||||
cp ./tun2proxy-android-libs.zip ./mypubdir4/
|
cp ./tun2proxy-android-libs.zip ./mypubdir4/
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
requests
|
requests
|
||||||
python-dotenv
|
python-dotenv
|
||||||
|
psutil
|
|
@ -4,6 +4,7 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
import psutil
|
||||||
|
|
||||||
import dotenv
|
import dotenv
|
||||||
import requests
|
import requests
|
||||||
|
@ -33,6 +34,14 @@ def get_tool_path():
|
||||||
default = default[0] if len(default) > 0 else 'tun2proxy-bin'
|
default = default[0] if len(default) > 0 else 'tun2proxy-bin'
|
||||||
return os.environ.get('TOOL_PATH', default)
|
return os.environ.get('TOOL_PATH', default)
|
||||||
|
|
||||||
|
def sudo_kill_process_and_children(proc):
|
||||||
|
try:
|
||||||
|
for child in psutil.Process(proc.pid).children(recursive=True):
|
||||||
|
if child.name() == 'tun2proxy-bin':
|
||||||
|
subprocess.run(['sudo', 'kill', str(child.pid)])
|
||||||
|
subprocess.run(['sudo', 'kill', str(proc.pid)])
|
||||||
|
except psutil.NoSuchProcess:
|
||||||
|
pass
|
||||||
|
|
||||||
class Tun2ProxyTest(unittest.TestCase):
|
class Tun2ProxyTest(unittest.TestCase):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -49,6 +58,7 @@ class Tun2ProxyTest(unittest.TestCase):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise e
|
raise e
|
||||||
finally:
|
finally:
|
||||||
|
sudo_kill_process_and_children(p)
|
||||||
p.terminate()
|
p.terminate()
|
||||||
p.wait()
|
p.wait()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue