Skip to content

Commit

Permalink
tweak(ci): Modify test application workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Und3rf10w committed Dec 23, 2024
1 parent 4f726e6 commit 66bf0a4
Showing 1 changed file with 12 additions and 38 deletions.
50 changes: 12 additions & 38 deletions .github/workflows/test_application.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test AnonSurf Installation and Functionality
name: Test AnonSurf Behavior on kali-rolling

on:
pull_request: # Trigger on all pull requests
Expand All @@ -21,47 +21,21 @@ jobs:
- name: Update packages and install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
# Temporarily move /etc/resolv.conf to avoid conflicts
mv /etc/resolv.conf /etc/resolv.conf.backup || true
# Install required packages
apt-get update
apt-get install -y ca-certificates curl bleachbit resolvconf tor iptables
# Restore /etc/resolv.conf after the installation
mv /etc/resolv.conf.backup /etc/resolv.conf || true
apt-get install -y ca-certificates curl bleachbit tor iptables
- name: Run installer script
- name: Test AnonSurf IPv6 Handling
run: |
chmod +x installer.sh
./installer.sh
chmod +x anonsurf.sh
./anonsurf.sh start
- name: Test AnonSurf Functionality
run: |
echo "Testing 'anonsurf start'..."
anonsurf start
echo "Testing IPv6 is disabled..."
IPv6_STATUS=$(sysctl net.ipv6.conf.all.disable_ipv6 | awk '{print $3}')
if [ "$IPv6_STATUS" != "1" ]; then
echo "IPv6 was not disabled correctly."
echo "Testing if IPv6 is disabled..."
if [ "$(sysctl net.ipv6.conf.all.disable_ipv6 | awk '{print $3}')" != "1" ]; then
echo "ERROR: IPv6 is not disabled!"
./anonsurf.sh stop
exit 1
fi
echo "IPv6 was disabled successfully."
echo "Testing sysctl configuration..."
if ! grep -q "net.ipv6.conf.all.disable_ipv6 = 1" /etc/sysctl.d/kali-anonsurf.conf; then
echo "Sysctl configuration for IPv6 is missing."
exit 1
fi
echo "Sysctl configuration is correct."
echo "Testing stopping AnonSurf..."
anonsurf stop
echo "IPv6 is successfully disabled."
- name: Cleanup
run: |
iptables -F
iptables -t nat -F
ip6tables -F
ip6tables -t nat -F
echo "Stopping AnonSurf and restoring network configuration..."
./anonsurf.sh stop

0 comments on commit 66bf0a4

Please sign in to comment.