├── README.md ├── check_ip.png ├── cover.svg ├── foxyproxy.png ├── screen.png └── scripts ├── 3proxy.service-Centos8 ├── 3proxy.sh ├── 8.sh ├── build.sh ├── install.sh ├── install2.sh ├── install_centos8.sh ├── main.sh ├── random.sh ├── system.sh ├── vultr.sh └── vultrcentos8.sh /README.md: -------------------------------------------------------------------------------- 1 | Redirect connections from different ports at one ipv4 address to unique random ipv6 address from \64 subnetwork. Based on 3proxy 2 | 3 | ![cover](cover.svg) 4 | 5 | ## Requirements 6 | - Centos 7 7 | - Ipv6 \64 8 | 9 | ## Installation 10 | VPS from [Vultr *100$ free*](https://www.vultr.com/?ref=8809561) used as Centos setup 11 | 12 | 1. `bash <(curl -s "https://raw.githubusercontent.com/thuongtin/ipv4-ipv6-proxy/master/scripts/install.sh")` 13 | 14 | 1. After installation dowload the file `proxy.zip` 15 | * File structure: `IP4:PORT:LOGIN:PASS` 16 | * You can use this online [util](http://buyproxies.org/panel/format.php 17 | ) to change proxy format as you like 18 | 19 | ## Test your proxy 20 | 21 | Install [FoxyProxy](https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/) in Firefox 22 | ![Foxy](foxyproxy.png) 23 | 24 | Open [ipv6-test.com](http://ipv6-test.com/) and check your connection 25 | ![check ip](check_ip.png) 26 | -------------------------------------------------------------------------------- /check_ip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thuongtin/ipv4-ipv6-proxy/513692187aa82d8259f853918c9b5a73feb8f4f6/check_ip.png -------------------------------------------------------------------------------- /cover.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /foxyproxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thuongtin/ipv4-ipv6-proxy/513692187aa82d8259f853918c9b5a73feb8f4f6/foxyproxy.png -------------------------------------------------------------------------------- /screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thuongtin/ipv4-ipv6-proxy/513692187aa82d8259f853918c9b5a73feb8f4f6/screen.png -------------------------------------------------------------------------------- /scripts/3proxy.service-Centos8: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=3proxy tiny proxy server 3 | Documentation=man:3proxy(1) 4 | After=network.target 5 | 6 | [Service] 7 | ExecStart=/usr/local/etc/3proxy/bin/3proxy /usr/local/etc/3proxy/3proxy.cfg & 8 | ExecReload=/bin/kill -SIGUSR1 $MAINPID 9 | KillMode=process 10 | Restart=on-failure 11 | RestartSec=60s 12 | LimitNOFILE=9999999 13 | LimitNPROC=9999999 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | Alias=3proxy.service 18 | -------------------------------------------------------------------------------- /scripts/3proxy.sh: -------------------------------------------------------------------------------- 1 | install_3proxy() { 2 | echo "installing 3proxy" 3 | URL="https://github.com/z3APA3A/3proxy/archive/3proxy-0.8.6.tar.gz" 4 | wget -qO- $URL | bsdtar -xvf- 5 | cd 3proxy-3proxy-0.8.6 6 | make -f Makefile.Linux 7 | mkdir -p /usr/local/etc/3proxy/{bin,logs,stat} 8 | cp src/3proxy /usr/local/etc/3proxy/bin/ 9 | cp ./scripts/rc.d/proxy.sh /etc/init.d/3proxy 10 | chmod +x /etc/init.d/3proxy 11 | chkconfig 3proxy on 12 | cd $WORKDIR 13 | } 14 | 15 | gen_3proxy() { 16 | cat <proxy.txt <> /etc/security/limits.conf 30 | echo "* soft nofile 999999" >> /etc/security/limits.conf 31 | echo "net.ipv6.conf.ens3.proxy_ndp=1" >> /etc/sysctl.conf 32 | echo "net.ipv6.conf.all.proxy_ndp=1" >> /etc/sysctl.conf 33 | echo "net.ipv6.conf.default.forwarding=1" >> /etc/sysctl.conf 34 | echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.conf 35 | echo "net.ipv6.ip_nonlocal_bind = 1" >> /etc/sysctl.conf 36 | sysctl -p 37 | systemctl stop firewalld 38 | systemctl disable firewalld 39 | 40 | cd $WORKDIR 41 | } 42 | 43 | gen_3proxy() { 44 | cat <proxy.txt </dev/null 104 | 105 | install_3proxy 106 | 107 | echo "working folder = /home/proxy-installer" 108 | WORKDIR="/home/proxy-installer" 109 | WORKDATA="${WORKDIR}/data.txt" 110 | mkdir $WORKDIR && cd $_ 111 | 112 | IP4=$(curl -4 -s icanhazip.com) 113 | IP6=$(curl -6 -s icanhazip.com | cut -f1-4 -d':') 114 | 115 | echo "Internal ip = ${IP4}. Exteranl sub for ip6 = ${IP6}" 116 | 117 | FIRST_PORT=10000 118 | LAST_PORT=11000 119 | 120 | gen_data >$WORKDIR/data.txt 121 | gen_iptables >$WORKDIR/boot_iptables.sh 122 | gen_ifconfig >$WORKDIR/boot_ifconfig.sh 123 | chmod +x $WORKDIR/boot_*.sh /etc/rc.local 124 | 125 | gen_3proxy >/usr/local/etc/3proxy/3proxy.cfg 126 | 127 | cat >>/etc/rc.local <install.sh 3 | 4 | cat system.sh >>install.sh 5 | cat 3proxy.sh >>install.sh 6 | cat main.sh >>install.sh 7 | -------------------------------------------------------------------------------- /scripts/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | random() { 3 | tr /dev/null 68 | 69 | install_3proxy 70 | 71 | echo "working folder = /home/proxy-installer" 72 | WORKDIR="/home/proxy-installer" 73 | WORKDATA="${WORKDIR}/data.txt" 74 | mkdir $WORKDIR && cd $_ 75 | 76 | IP4=$(curl -4 -s v4.ipv6-test.com/api/myip.php) 77 | IP6=$(curl -6 -s v6.ipv6-test.com/api/myip.php | cut -f1-4 -d':') 78 | 79 | echo "Internal ip = ${IP4}. Exteranl sub for ip6 = ${IP6}" 80 | 81 | FIRST_PORT=10000 82 | LAST_PORT=13500 83 | 84 | gen_data >$WORKDIR/data.txt 85 | gen_iptables >$WORKDIR/boot_iptables.sh 86 | gen_ifconfig >$WORKDIR/boot_ifconfig.sh 87 | chmod +x $WORKDIR/boot_*.sh /etc/rc.local 88 | 89 | gen_3proxy >/usr/local/etc/3proxy/3proxy.cfg 90 | 91 | cat >>/etc/rc.local <proxy.txt </dev/null 78 | 79 | install_3proxy 80 | 81 | echo "working folder = /home/proxy-installer" 82 | WORKDIR="/home/proxy-installer" 83 | WORKDATA="${WORKDIR}/data.txt" 84 | mkdir $WORKDIR && cd $_ 85 | 86 | IP4=$(curl -4 -s icanhazip.com) 87 | IP6=$(curl -6 -s icanhazip.com | cut -f1-4 -d':') 88 | 89 | echo "Internal ip = ${IP4}. Exteranl sub for ip6 = ${IP6}" 90 | 91 | echo "How many proxy do you want to create? Example 500" 92 | read COUNT 93 | 94 | FIRST_PORT=10000 95 | LAST_PORT=$(($FIRST_PORT + $COUNT)) 96 | 97 | gen_data >$WORKDIR/data.txt 98 | gen_iptables >$WORKDIR/boot_iptables.sh 99 | gen_ifconfig >$WORKDIR/boot_ifconfig.sh 100 | chmod +x $WORKDIR/boot_*.sh /etc/rc.local 101 | 102 | gen_3proxy >/usr/local/etc/3proxy/3proxy.cfg 103 | 104 | cat >>/etc/rc.local <> /etc/security/limits.conf 30 | echo "* soft nofile 999999" >> /etc/security/limits.conf 31 | echo "net.ipv6.conf.ens3.proxy_ndp=1" >> /etc/sysctl.conf 32 | echo "net.ipv6.conf.all.proxy_ndp=1" >> /etc/sysctl.conf 33 | echo "net.ipv6.conf.default.forwarding=1" >> /etc/sysctl.conf 34 | echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.conf 35 | echo "net.ipv6.ip_nonlocal_bind = 1" >> /etc/sysctl.conf 36 | sysctl -p 37 | systemctl stop firewalld 38 | systemctl disable firewalld 39 | 40 | cd $WORKDIR 41 | } 42 | 43 | gen_3proxy() { 44 | cat <proxy.txt </dev/null 104 | 105 | install_3proxy 106 | 107 | echo "working folder = /home/proxy-installer" 108 | WORKDIR="/home/proxy-installer" 109 | WORKDATA="${WORKDIR}/data.txt" 110 | mkdir $WORKDIR && cd $_ 111 | 112 | IP4=$(curl -4 -s icanhazip.com) 113 | IP6=$(curl -6 -s icanhazip.com | cut -f1-4 -d':') 114 | 115 | echo "Internal ip = ${IP4}. Exteranl sub for ip6 = ${IP6}" 116 | 117 | echo "How many proxy do you want to create? Example 500" 118 | read COUNT 119 | 120 | FIRST_PORT=10000 121 | LAST_PORT=$(($FIRST_PORT + $COUNT)) 122 | 123 | gen_data >$WORKDIR/data.txt 124 | gen_iptables >$WORKDIR/boot_iptables.sh 125 | gen_ifconfig >$WORKDIR/boot_ifconfig.sh 126 | chmod +x $WORKDIR/boot_*.sh /etc/rc.local 127 | 128 | gen_3proxy >/usr/local/etc/3proxy/3proxy.cfg 129 | 130 | cat >>/etc/rc.local </dev/null 3 | 4 | install_3proxy 5 | 6 | echo "working folder = /home/proxy-installer" 7 | WORKDIR="/home/proxy-installer" 8 | WORKDATA="${WORKDIR}/data.txt" 9 | mkdir $WORKDIR && cd $_ 10 | 11 | IP4=$(curl -4 -s ifconfig.co) 12 | IP6=$(curl -6 -s ifconfig.co | cut -f1-4 -d':') 13 | 14 | echo "Internal ip = ${IP4}. Exteranl sub for ip6 = ${IP6}" 15 | 16 | echo "How many proxy do you want to create? Example 500" 17 | read COUNT 18 | 19 | FIRST_PORT=10000 20 | LAST_PORT=$(($FIRST_PORT + $COUNT)) 21 | 22 | gen_data >$WORKDIR/data.txt 23 | gen_iptables >$WORKDIR/boot_iptables.sh 24 | gen_ifconfig >$WORKDIR/boot_ifconfig.sh 25 | chmod +x boot_*.sh /etc/rc.local 26 | 27 | gen_3proxy >/usr/local/etc/3proxy/3proxy.cfg 28 | 29 | cat >>/etc/rc.local <proxy.txt </dev/null 85 | 86 | install_3proxy 87 | 88 | echo "working folder = /home/proxy-installer" 89 | WORKDIR="/home/proxy-installer" 90 | WORKDATA="${WORKDIR}/data.txt" 91 | mkdir $WORKDIR && cd $_ 92 | 93 | IP4=$(curl -4 -s v4.ipv6-test.com/api/myip.php) 94 | IP6=$(curl -6 -s v6.ipv6-test.com/api/myip.php | cut -f1-4 -d':') 95 | 96 | echo "Internal ip = ${IP4}. Exteranl sub for ip6 = ${IP6}" 97 | 98 | FIRST_PORT=10000 99 | LAST_PORT=11000 100 | 101 | gen_data >$WORKDIR/data.txt 102 | gen_iptables >$WORKDIR/boot_iptables.sh 103 | gen_ifconfig >$WORKDIR/boot_ifconfig.sh 104 | chmod +x $WORKDIR/boot_*.sh /etc/rc.local 105 | 106 | gen_3proxy >/usr/local/etc/3proxy/3proxy.cfg 107 | 108 | cat >>/etc/rc.local <> /etc/security/limits.conf 30 | echo "* soft nofile 999999" >> /etc/security/limits.conf 31 | echo "net.ipv6.conf.enp1s0.proxy_ndp=1" >> /etc/sysctl.conf 32 | echo "net.ipv6.conf.all.proxy_ndp=1" >> /etc/sysctl.conf 33 | echo "net.ipv6.conf.default.forwarding=1" >> /etc/sysctl.conf 34 | echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.conf 35 | echo "net.ipv6.ip_nonlocal_bind = 1" >> /etc/sysctl.conf 36 | sysctl -p 37 | systemctl stop firewalld 38 | systemctl disable firewalld 39 | 40 | cd $WORKDIR 41 | } 42 | 43 | gen_3proxy() { 44 | cat <proxy.txt </dev/null 104 | 105 | install_3proxy 106 | 107 | echo "working folder = /home/proxy-installer" 108 | WORKDIR="/home/proxy-installer" 109 | WORKDATA="${WORKDIR}/data.txt" 110 | mkdir $WORKDIR && cd $_ 111 | 112 | IP4=$(curl -4 -s icanhazip.com) 113 | IP6=$(curl -6 -s icanhazip.com | cut -f1-4 -d':') 114 | 115 | echo "Internal ip = ${IP4}. Exteranl sub for ip6 = ${IP6}" 116 | 117 | FIRST_PORT=10000 118 | LAST_PORT=11000 119 | 120 | gen_data >$WORKDIR/data.txt 121 | gen_iptables >$WORKDIR/boot_iptables.sh 122 | gen_ifconfig >$WORKDIR/boot_ifconfig.sh 123 | chmod +x $WORKDIR/boot_*.sh /etc/rc.local 124 | 125 | gen_3proxy >/usr/local/etc/3proxy/3proxy.cfg 126 | 127 | cat >>/etc/rc.local <> /etc/security/limits.conf 32 | echo "* soft nofile 999999" >> /etc/security/limits.conf 33 | echo "net.ipv6.conf.$main_interface.proxy_ndp=1" >> /etc/sysctl.conf 34 | echo "net.ipv6.conf.all.proxy_ndp=1" >> /etc/sysctl.conf 35 | echo "net.ipv6.conf.default.forwarding=1" >> /etc/sysctl.conf 36 | echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.conf 37 | echo "net.ipv6.ip_nonlocal_bind = 1" >> /etc/sysctl.conf 38 | sysctl -p 39 | systemctl stop firewalld 40 | systemctl disable firewalld 41 | 42 | cd $WORKDIR 43 | } 44 | 45 | gen_3proxy() { 46 | cat <proxy.txt </dev/null 106 | 107 | install_3proxy 108 | 109 | echo "working folder = /home/proxy-installer" 110 | WORKDIR="/home/proxy-installer" 111 | WORKDATA="${WORKDIR}/data.txt" 112 | mkdir $WORKDIR && cd $_ 113 | 114 | IP4=$(curl -4 -s icanhazip.com) 115 | IP6=$(curl -6 -s icanhazip.com | cut -f1-4 -d':') 116 | 117 | echo "Internal ip = ${IP4}. Exteranl sub for ip6 = ${IP6}" 118 | 119 | FIRST_PORT=10000 120 | LAST_PORT=11000 121 | 122 | gen_data >$WORKDIR/data.txt 123 | gen_iptables >$WORKDIR/boot_iptables.sh 124 | gen_ifconfig >$WORKDIR/boot_ifconfig.sh 125 | echo NM_CONTROLLED="no" >> /etc/sysconfig/network-scripts/ifcfg-${main_interface} 126 | chmod +x $WORKDIR/boot_*.sh /etc/rc.local 127 | 128 | gen_3proxy >/usr/local/etc/3proxy/3proxy.cfg 129 | 130 | cat >>/etc/rc.local <