中文 English

Use v2ray to configure intranet access based on a public IP

Published: 2023-03-25
v2ray Lan

Prerequisites

Requirements

Note: Please modify the UUID and port number below as needed.

v2ray configuration file [Server side]

{
    "inbounds": [
        {
            "port": 12345,
            "listen": "0.0.0.0",
            "protocol": "vmess",
            "settings": {
                "clients": [
                    {
                        "id": "643773f3-568d-4655-bc48-a75afb2eccdd",
                        "level": 1,
                        "alterId": 16
                    }
                ]
            }
        },
        {
            "port": 12345,
            "listen": "0.0.0.0",
            "protocol": "vmess",
            "settings": {
                "clients": [
                    {
                        "id": "643773f3-568d-4655-bc48-a75afb2eccdd",
                        "level": 1,
                        "alterId": 16
                    }
                ]
            },
            "streamSettings": {
                "network": "mkcp",
                "kcpSettings": {
                    "uplinkCapacity": 200,
                    "downlinkCapacity": 30,
                    "congestion": true,
                    "header": {
                        "type": "none"
                    }
                }
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "settings": {}
        }
    ]
}

v2ray configuration [Client side]

Port number: 12345 UUID: 643773f3-568d-4655-bc48-a75afb2eccdd Transmission mode: tcp / mkcp Extra ID: 0 UDP forwarding: enabled TLS: disabled Multiplexing: disabled TCP fast open: disabled Algorithm: auto

Add firewall configuration port

firewall-cmd --zone=public --add-port=12345/tcp --permanent
firewall-cmd --zone=public --add-port=12345/udp --permanent
firewall-cmd --reload