For this you need two servers, one in Iran and the other outside of Iran.
you can google it or using websites like Sindad or ParsPack or any other services you like.
Note: You don't need anything fancy, even the most basic and simple plans of the VPS's will do the magic.
Your server inside Iran will act as a router. It's only job is to route traffic from within the country to the main server (non-IR) which hosts the actual Vmess proxy.
All commands are base on debian-based linux distros. e.g. Ubuntu.
Note: There is no authentication mechanism applied for the sake of simplicity.
Share it with your loved ones
#MahsaAmini
#womanlifefreedom
Let's get started.
You can either clone this repo on your servers and just set your configurations or go by the following steps.
sudo apt update && apt upgrade -y
nano docker-compose.yaml
version: "3"
services:
v2ray443:
image: v2fly/v2fly-core:v4.45.2
restart: always
network_mode: host
environment:
- V2RAY_VMESS_AEAD_FORCED=false
volumes:
- ./config.json:/etc/v2ray/config.json:ro
nano config.json
Navigate to UUID Generator and grab a UUID V1, and replace it with xxx-xxx-xxx
Write your UUID in notepad, you gonna need it later.
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"port": 80,
"protocol": "vmess",
"allocate": {
"strategy": "always"
},
"settings": {
"clients": [
{
"id": "xxx-xxx-xxx",
"level": 1,
"alterId": 0,
"email": "client@example.com"
}
],
"disableInsecureEncryption": true
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"connectionReuse": true,
"path": "/graphql"
},
"security": "none",
"tcpSettings": {
"header": {
"type": "http",
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": {
"Content-Type": [
"application/octet-stream",
"application/x-msdownload",
"text/html",
"application/x-shockwave-flash"
],
"Transfer-Encoding": ["chunked"],
"Connection": ["keep-alive"],
"Pragma": "no-cache"
}
}
}
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
sed -i 's/xxx-xxx-xxx/YOUR_NEW_UUID/g' ./config.json
Note: the docker-compose.yaml
and config.json
files need to be under the same directory.
sudo apt install docker docker-compose
docker-compose up -d
That's it for your non-IR Server, now let's setup you IR Server.
sudo apt update && apt upgrade -y
sudo apt install iptables-persistent
sudo nano /etc/iptables/rules.v4
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -d xx.xx.xx.xx -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -d xx.xx.xx.xx -p udp -m udp --dport 80 -j ACCEPT
COMMIT
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -p tcp -m tcp --dport 80 -j DNAT --to-destination xx.xx.xx.xx
-A PREROUTING -p udp -m udp --dport 80 -j DNAT --to-destination xx.xx.xx.xx
-A POSTROUTING -d xx.xx.xx.xx -p tcp -m tcp --dport 80 -j MASQUERADE
-A POSTROUTING -d xx.xx.xx.xx -p udp -m udp --dport 80 -j MASQUERADE
COMMIT
sudo sed -i 's/xx.xx.xx.xx/NON_IR_IP/g' /etc/iptables/rules.v4
This will replace all occurences of xx.xx.xx.xx
with the actual IP address of your non-IR server.
sudo nano /etc/sysctl.conf
Add the following line to the beginning of the file (or just find it and uncomment it) and save:
net.ipv4.ip_forward=1
sudo sysctl -p
sudo systemctl restart iptables.service
Now head over to the Guide
directory for instructions on how to connect to your server using a Vmess client.
Just in case you want to support me, I'd realy appriciate it.
TRC20 TT2AMeebAUGFcG9jLPA49xN1eMCyDekz6c
ERC20 0x9A6471A8d01A66e81433d97aF3e1288f7C2E6a7b