├── README.md └── setup.sh /README.md: -------------------------------------------------------------------------------- 1 | # generate-your-own-ipv6-proxies 2 | https://www.r10.net/vpn-proxy/3404248-bedava-ipv6-proxy-uretmek.html 3 | 4 | # How it works 5 | 6 | The script establishes 6to4 tunnels. You connect to your server's ipv4 address on a specific port and output one of the ipv6 addresses from your subnet. 7 | 8 | ## Features 9 | 10 | - Supported networks: `/48`, `/64` 11 | - Connection protocols: `http(s)` / `socks5` 12 | - Authentication by username and password (or w/o auth) 13 | - Custom port numbering (from start) 14 | - Simultaneous online over 60000 proxies 15 | - Minor resource usage (1000 online proxies = ~ 50mb ram) 16 | - Auto generating tunnels list 17 | 18 | # Installation 19 | 20 | ``` 21 | wget https://raw.githubusercontent.com/niceleet/generate-your-own-ipv6-proxies/main/setup.sh 22 | chmod 777 setup.sh 23 | ./setup.sh 24 | 25 | ``` 26 | 27 | # How to start 28 | 29 | 0. Create account on https://tunnelbroker.net 30 | 1. Prepare your own server with a Debian based os. 31 | It's much better if you only use the server for your proxies and nothing more, because this script changes some system configurations that may affect your other applications. Cheap VPS servers are a great choice. 32 | 2. Create Regular Tunnel 33 | 3. Install the script on your server. 34 | 4. After installation, the server will be rebooted 35 | 5. The list of tunnels is located in your home directory (~/tunnels.txt) 36 | 37 | # Requirements 38 | 39 | - Debian based os (tested: Debian 9-11, Ubuntu 18-22) 40 | - 1 CPU, 256 MB RAM 41 | - The ability to connect to ipv6 addresses 42 | - Check: `ping6 -c3 google.com &>/dev/null && echo "Connected successfully" || echo "Connection error"` 43 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ping6 -c3 google.com &>/dev/null; then 4 | echo "Your server is ready to set up IPv6 proxies!" 5 | else 6 | echo "Your server can't connect to IPv6 addresses." 7 | echo "Please, connect ipv6 interface to your server to continue." 8 | exit 1 9 | fi 10 | 11 | #### 12 | echo "↓ Routed /48 or /64 IPv6 prefix from tunnelbroker (*:*:*::/*):" 13 | read PROXY_NETWORK 14 | 15 | if [[ $PROXY_NETWORK == *"::/48"* ]]; then 16 | PROXY_NET_MASK=48 17 | elif [[ $PROXY_NETWORK == *"::/64"* ]]; then 18 | PROXY_NET_MASK=64 19 | else 20 | echo "● Unsupported IPv6 prefix format: $PROXY_NETWORK" 21 | exit 1 22 | fi 23 | 24 | #### 25 | echo "↓ Server IPv4 address from tunnelbroker:" 26 | read TUNNEL_IPV4_ADDR 27 | if [[ ! "$TUNNEL_IPV4_ADDR" ]]; then 28 | echo "● IPv4 address can't be emty" 29 | exit 1 30 | fi 31 | 32 | #### 33 | echo "↓ Proxies login (can be blank):" 34 | read PROXY_LOGIN 35 | 36 | if [[ "$PROXY_LOGIN" ]]; then 37 | echo "↓ Proxies password:" 38 | read PROXY_PASS 39 | if [[ ! "PROXY_PASS" ]]; then 40 | echo "● Proxies pass can't be emty" 41 | exit 1 42 | fi 43 | fi 44 | 45 | #### 46 | echo "↓ Port numbering start (default 1500):" 47 | read PROXY_START_PORT 48 | if [[ ! "$PROXY_START_PORT" ]]; then 49 | PROXY_START_PORT=1500 50 | fi 51 | 52 | #### 53 | echo "↓ Proxies count (default 1):" 54 | read PROXY_COUNT 55 | if [[ ! "$PROXY_COUNT" ]]; then 56 | PROXY_COUNT=1 57 | fi 58 | 59 | #### 60 | echo "↓ Proxies protocol (http, socks5; default http):" 61 | read PROXY_PROTOCOL 62 | if [[ PROXY_PROTOCOL != "socks5" ]]; then 63 | PROXY_PROTOCOL="http" 64 | fi 65 | 66 | #### 67 | clear 68 | sleep 1 69 | PROXY_NETWORK=$(echo $PROXY_NETWORK | awk -F:: '{print $1}') 70 | echo "● Network: $PROXY_NETWORK" 71 | echo "● Network Mask: $PROXY_NET_MASK" 72 | HOST_IPV4_ADDR=$(hostname -I | awk '{print $1}') 73 | echo "● Host IPv4 address: $HOST_IPV4_ADDR" 74 | echo "● Tunnel IPv4 address: $TUNNEL_IPV4_ADDR" 75 | echo "● Proxies count: $PROXY_COUNT, starting from port: $PROXY_START_PORT" 76 | echo "● Proxies protocol: $PROXY_PROTOCOL" 77 | if [[ "$PROXY_LOGIN" ]]; then 78 | echo "● Proxies login: $PROXY_LOGIN" 79 | echo "● Proxies password: $PROXY_PASS" 80 | fi 81 | 82 | #### 83 | echo "-------------------------------------------------" 84 | echo ">-- Updating packages and installing dependencies" 85 | apt-get update >/dev/null 2>&1 86 | apt-get -y install gcc g++ make bc pwgen git >/dev/null 2>&1 87 | 88 | #### 89 | echo ">-- Setting up sysctl.conf" 90 | cat >>/etc/sysctl.conf <-- Setting up logind.conf" 108 | echo "UserTasksMax=1000000" >>/etc/systemd/logind.conf 109 | 110 | #### 111 | echo ">-- Setting up system.conf" 112 | cat >>/etc/systemd/system.conf <-- Setting up ndppd" 122 | cd ~ 123 | git clone --quiet https://github.com/DanielAdolfsson/ndppd.git >/dev/null 124 | cd ~/ndppd 125 | make -k all >/dev/null 2>&1 126 | make -k install >/dev/null 2>&1 127 | cat >~/ndppd/ndppd.conf <-- Setting up 3proxy" 141 | cd ~ 142 | wget -q https://github.com/z3APA3A/3proxy/archive/0.8.13.tar.gz 143 | tar xzf 0.8.13.tar.gz 144 | mv ~/3proxy-0.8.13 ~/3proxy 145 | rm 0.8.13.tar.gz 146 | cd ~/3proxy 147 | chmod +x src/ 148 | touch src/define.txt 149 | echo "#define ANONYMOUS 1" >src/define.txt 150 | sed -i '31r src/define.txt' src/proxy.h 151 | make -f Makefile.Linux >/dev/null 2>&1 152 | cat >~/3proxy/3proxy.cfg <>~/3proxy/3proxy.cfg <>~/3proxy/3proxy.cfg <-- Generating IPv6 addresses" 179 | touch ~/ip.list 180 | touch ~/tunnels.txt 181 | 182 | P_VALUES=(1 2 3 4 5 6 7 8 9 0 a b c d e f) 183 | PROXY_GENERATING_INDEX=1 184 | GENERATED_PROXY="" 185 | 186 | generate_proxy() { 187 | a=${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]} 188 | b=${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]} 189 | c=${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]} 190 | d=${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]} 191 | e=${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]}${P_VALUES[$RANDOM % 16]} 192 | 193 | echo "$PROXY_NETWORK:$a:$b:$c:$d$([ $PROXY_NET_MASK == 48 ] && echo ":$e" || echo "")" >>~/ip.list 194 | 195 | } 196 | 197 | while [ "$PROXY_GENERATING_INDEX" -le $PROXY_COUNT ]; do 198 | generate_proxy 199 | let "PROXY_GENERATING_INDEX+=1" 200 | done 201 | 202 | CURRENT_PROXY_PORT=${PROXY_START_PORT} 203 | for e in $(cat ~/ip.list); do 204 | echo "$([ $PROXY_PROTOCOL == "socks5" ] && echo "socks" || echo "proxy") -6 -s0 -n -a -p$CURRENT_PROXY_PORT -i$HOST_IPV4_ADDR -e$e" >>~/3proxy/3proxy.cfg 205 | echo "$PROXY_PROTOCOL://$([ "$PROXY_LOGIN" ] && echo "$PROXY_LOGIN:$PROXY_PASS@" || echo "")$HOST_IPV4_ADDR:$CURRENT_PROXY_PORT" >>~/tunnels.txt 206 | let "CURRENT_PROXY_PORT+=1" 207 | done 208 | 209 | #### 210 | echo ">-- Setting up rc.local" 211 | cat >/etc/rc.local <