Spaces:
Paused
Paused
Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889FROM debian:stable-slimLABEL authors="prolpaser"WORKDIR /appRUN apt-get update && apt-get install -y curl git ca-certificates && apt-get clean && \curl -L -sS https://github.com/artem-russkikh/wireproxy-awg/releases/latest/download/wireproxy_linux_amd64.tar.gz -o /app/awg.tar.gz && \tar -xzf /app/awg.tar.gz -C /app && rm /app/awg.tar.gz && mv /app/wireproxy /app/awg && chmod +x /app/awgCOPY <<-"EOF" /app/resolv.confnameserver 1.1.1.1nameserver 1.0.0.1nameserver 2606:4700:4700::1111nameserver 2606:4700:4700::1002EOFCOPY <<-"EOF" /app/awg.conf[Interface]PrivateKey = TzzFmtrZ0+dg8KsDLc0+dqYaKMmnQl8WTtfYsvkCJqY=Address = 172.16.0.2, 2606:4700:110:898e:8ea3:1dab:96fa:5017DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001MTU = 1280S1 = 0S2 = 0S3 = 0S4 = 0Jc = 4Jmin = 40Jmax = 70H1 = 1H2 = 2H3 = 3H4 = 4I1 = <b 0x494e56495445207369703a626f624062696c6f78692e636f6d205349502f322e300d0a5669613a205349502f322e302f55445020706333332e61746c616e74612e636f6d3b6272616e63683d7a39684734624b3737366173646864730d0a4d61782d466f7277617264733a2037300d0a546f3a20426f62203c7369703a626f624062696c6f78692e636f6d3e0d0a46726f6d3a20416c696365203c7369703a616c6963654061746c616e74612e636f6d3e3b7461673d313932383330313737340d0a43616c6c2d49443a20613834623463373665363637313040706333332e61746c616e74612e636f6d0d0a435365713a2033313431353920494e564954450d0a436f6e746163743a203c7369703a616c69636540706333332e61746c616e74612e636f6d3e0d0a436f6e74656e742d547970653a206170706c69636174696f6e2f7364700d0a436f6e74656e742d4c656e6774683a20300d0a0d0a>I2 = <b 0x5349502f322e302031303020547279696e670d0a5669613a205349502f322e302f55445020706333332e61746c616e74612e636f6d3b6272616e63683d7a39684734624b3737366173646864730d0a546f3a20426f62203c7369703a626f624062696c6f78692e636f6d3e0d0a46726f6d3a20416c696365203c7369703a616c6963654061746c616e74612e636f6d3e3b7461673d313932383330313737340d0a43616c6c2d49443a20613834623463373665363637313040706333332e61746c616e74612e636f6d0d0a435365713a2033313431353920494e564954450d0a436f6e74656e742d4c656e6774683a20300d0a0d0a>[Peer]PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=AllowedIPs = 0.0.0.0/0, ::/0Endpoint = 162.159.192.1:4500PersistentKeepalive = 25[Socks5]BindAddress = 127.0.0.1:25344EOFCOPY --chmod=755 <<-"EOF" /entrypoint.sh#!/bin/bashcat /app/resolv.conf > /etc/resolv.confif [ -n "$AWG_PRIVATE_KEY" ]; thenecho "configuring WARP PrivateKey..."sed -i "s|^PrivateKey *=.*|PrivateKey = ${AWG_PRIVATE_KEY}|" /app/awg.confelseecho "AWG_PRIVATE_KEY is not set, use defauly WARP PrivateKey"fiif [ -n "$AWG_ENDPOINT" ]; thenecho "configuring WARP Endpoint..."sed -i "s|^Endpoint *=.*|Endpoint = ${AWG_ENDPOINT}|" /app/awg.confelseecho "AWG_ENDPOINT is not set, use random WARP endpoint:"endpoints=("162.159.192.1:4500" "162.159.192.1:928" "162.159.192.1:878" "162.159.192.1:4233" "162.159.195.2:4198" "162.159.195.4:943" "162.159.195.5:934" "162.159.195.6:7103" "162.159.195.7:7152" "162.159.195.7:890")random_endpoint=${endpoints[$((RANDOM % ${#endpoints[@]}))]}echo ${random_endpoint}sed -i "s|^Endpoint *=.*|Endpoint = ${random_endpoint}|" /app/awg.conffiecho "run awg..."/app/awg --config /app/awg.conf > /dev/null 2>&1 &sleep 3echo "test w/o awg:"curl -sS 2ip.meecho "test with awg:"curl -sS -x socks5://127.0.0.1:25344 2ip.meecho "setup proxy..."export http_proxy="socks5h://127.0.0.1:25344"export https_proxy="socks5h://127.0.0.1:25344"export all_proxy="socks5h://127.0.0.1:25344"export HTTP_PROXY="socks5h://127.0.0.1:25344"export HTTPS_PROXY="socks5h://127.0.0.1:25344"export ALL_PROXY="socks5h://127.0.0.1:25344"echo "test system-wide proxy:"curl -sS 2ip.meecho -e "\n\n==================================\nWARP ON: socks5h://127.0.0.1:25344\n==================================\n\n"exec "$@"EOFENTRYPOINT ["/entrypoint.sh"]1234FROM ghcr.io/prolapser/debian-awg:latestCMD ["curl", "ifconfig.me"]
Dockerfile+2-87