mirror of
https://github.com/quintusl/rust-socksd.git
synced 2026-11-15 08:15:23 +00:00
Merge branch 'main' of github.com:quintusl/rusty-socks
This commit is contained in:
@@ -91,9 +91,12 @@ jobs:
|
||||
- target: aarch64-unknown-linux-gnu
|
||||
arch: arm64
|
||||
linker: aarch64-linux-gnu-gcc
|
||||
rustflags: '["-C", "target-feature=+crt-static"]'
|
||||
- target: armv7-unknown-linux-gnueabihf
|
||||
arch: armhf
|
||||
linker: arm-linux-gnueabihf-gcc
|
||||
linker: '/opt/rpi_tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc'
|
||||
rustflags: '["-C", "target-feature=+crt-static"]'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -121,6 +124,10 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends debhelper-compat rustup gcc-arm-linux-gnueabihf libc6-dev-armhf-cross pkg-config
|
||||
mkdir -p /opt
|
||||
# Download and extract Raspberry Pi cross-compilation tools
|
||||
git clone https://github.com/raspberrypi/tools /opt/rpi_tools
|
||||
rustup target add ${{ matrix.target }}
|
||||
rustup -q update
|
||||
|
||||
- name: Install cross-compilation dependencies (for ARM64)
|
||||
@@ -128,6 +135,7 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends debhelper-compat rustup gcc-aarch64-linux-gnu libc6-dev-arm64-cross pkg-config
|
||||
rustup target add ${{ matrix.target }}
|
||||
rustup -q update
|
||||
|
||||
- name: Configure linker for cross-compilation (for ARM)
|
||||
@@ -136,6 +144,7 @@ jobs:
|
||||
mkdir -p .cargo
|
||||
echo '[target.${{ matrix.target }}]' > .cargo/config.toml
|
||||
echo 'linker = "${{ matrix.linker }}"' >> .cargo/config.toml
|
||||
echo 'rustflags = ${{ matrix.rustflags }}' >> .cargo/config.toml
|
||||
echo "Configured .cargo/config.toml for ${{ matrix.target }}:"
|
||||
cat .cargo/config.toml
|
||||
|
||||
@@ -146,6 +155,11 @@ jobs:
|
||||
- name: Build Debian package for armhf
|
||||
if: matrix.arch == 'armhf'
|
||||
env:
|
||||
# Set target for cross-compilation
|
||||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
||||
# For armhf specifically, ensure we use the right target features
|
||||
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: 'arm-linux-gnueabihf-gcc'
|
||||
# PKG_CONFIG settings for cross-compilation
|
||||
PKG_CONFIG_ALLOW_CROSS: 1
|
||||
PKG_CONFIG_PATH: '/usr/lib/arm-linux-gnueabihf/pkgconfig'
|
||||
run: dpkg-buildpackage -b -d -uc -us --host-arch ${{ matrix.arch }}
|
||||
@@ -153,6 +167,11 @@ jobs:
|
||||
- name: Build Debian package for arm64
|
||||
if: matrix.arch == 'arm64'
|
||||
env:
|
||||
# Set target for cross-compilation
|
||||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
||||
# For armhf specifically, ensure we use the right target features
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: 'aarch64-linux-gnu-gcc'
|
||||
# PKG_CONFIG settings for cross-compilation
|
||||
PKG_CONFIG_ALLOW_CROSS: 1
|
||||
PKG_CONFIG_PATH: '/usr/lib/aarch64-linux-gnu/pkgconfig'
|
||||
run: dpkg-buildpackage -b -d -uc -us --host-arch ${{ matrix.arch }}
|
||||
|
||||
+3
-3
@@ -24,9 +24,6 @@ target/
|
||||
.vscode/
|
||||
|
||||
# Debian
|
||||
debhelper-build-stamp
|
||||
.DS_Store
|
||||
.debhelper
|
||||
*.deb
|
||||
*.dsc
|
||||
*.build
|
||||
@@ -38,3 +35,6 @@ debhelper-build-stamp
|
||||
.vagrant
|
||||
debian/rusty-socks
|
||||
debian/files
|
||||
debian/debhelper-build-stamp
|
||||
debian/.debhelper
|
||||
debian/rusty-socks.postrm.debhelper
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
rusty-socks (0.1.0-1) unstable; urgency=medium
|
||||
|
||||
* Initial release of Rusty SOCKS proxy server
|
||||
* Full SOCKS5 protocol implementation with authentication support
|
||||
* HTTP proxy functionality with CONNECT method
|
||||
* Multi-threaded async architecture using tokio
|
||||
* YAML configuration system with validation
|
||||
* Systemd service integration
|
||||
* Comprehensive security features and logging
|
||||
* Debian packaging and Arch AUR support
|
||||
|
||||
-- Quintus Leung <quintusl@gmail.com> Tue, 27 May 2025 12:00:00 +0000
|
||||
@@ -1,30 +0,0 @@
|
||||
# Automatically added by dh_installsystemd/13.11.4
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||
# The following line should be removed in trixie or trixie+1
|
||||
deb-systemd-helper unmask 'rusty-socks.service' >/dev/null || true
|
||||
|
||||
# was-enabled defaults to true, so new installations run enable.
|
||||
if deb-systemd-helper --quiet was-enabled 'rusty-socks.service'; then
|
||||
# Enables the unit on first installation, creates new
|
||||
# symlinks on upgrades if the unit file has changed.
|
||||
deb-systemd-helper enable 'rusty-socks.service' >/dev/null || true
|
||||
else
|
||||
# Update the statefile to add new symlinks (if any), which need to be
|
||||
# cleaned up on purge. Also remove old symlinks.
|
||||
deb-systemd-helper update-state 'rusty-socks.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installsystemd/13.11.4
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
if [ -n "$2" ]; then
|
||||
_dh_action=restart
|
||||
else
|
||||
_dh_action=start
|
||||
fi
|
||||
deb-systemd-invoke $_dh_action 'rusty-socks.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
||||
@@ -1,5 +0,0 @@
|
||||
# Automatically added by dh_installsystemd/13.11.4
|
||||
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
|
||||
deb-systemd-invoke stop 'rusty-socks.service' >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
rusty-socks
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
rusty-socks_0.1.0-1_amd64.buildinfo net optional
|
||||
rusty-socks_0.1.0-1_amd64.deb net optional
|
||||
Vendored
+8
@@ -4,10 +4,18 @@
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
ifdef CARGO_BUILD_TARGET
|
||||
cargo build --release --target $(CARGO_BUILD_TARGET)
|
||||
else
|
||||
cargo build --release
|
||||
endif
|
||||
|
||||
override_dh_auto_install:
|
||||
ifdef CARGO_BUILD_TARGET
|
||||
install -D -m755 target/$(CARGO_BUILD_TARGET)/release/rusty-socks debian/rusty-socks/usr/bin/rusty-socks
|
||||
else
|
||||
install -D -m755 target/release/rusty-socks debian/rusty-socks/usr/bin/rusty-socks
|
||||
endif
|
||||
install -D -m644 config/rusty-socks.service debian/rusty-socks/lib/systemd/system/rusty-socks.service
|
||||
install -D -m644 config/rusty-socks.sysusers.conf debian/rusty-socks/usr/lib/sysusers.d/rusty-socks.conf
|
||||
install -D -m640 config/config.yml.journald.example debian/rusty-socks/etc/rusty-socks/config.yml
|
||||
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
# Automatically added by dh_installsystemd/13.11.4
|
||||
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installsystemd/13.11.4
|
||||
if [ "$1" = "purge" ]; then
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
deb-systemd-helper purge 'rusty-socks.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
shlibs:Depends=libc6 (>= 2.34), libgcc-s1 (>= 4.2)
|
||||
misc:Depends=
|
||||
misc:Pre-Depends=
|
||||
Reference in New Issue
Block a user