linux:v2ray
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:v2ray [2019/07/13 21:48] – [Config file for client] percy | linux:v2ray [2021/10/02 22:32] (current) – [start/stop] percy | ||
|---|---|---|---|
| Line 26: | Line 26: | ||
| ===== start/stop ===== | ===== start/stop ===== | ||
| - | + | | |
| - | + | sudo systemctl restart v2ray | |
| - | ``` | + | |
| - | sudo systemctl start v2ray | + | |
| - | sudo systemctl restart v2ray | + | |
| - | ``` | + | |
| ===== Mac Install ===== | ===== Mac Install ===== | ||
| Line 47: | Line 43: | ||
| brew services restart v2ray-core | brew services restart v2ray-core | ||
| + | ===== Router Install ===== | ||
| + | Download the correct version | ||
| + | - https:// | ||
| + | wget -cS https:// | ||
| + | unzip v2ray-linux-arm.zip | ||
| + | Then copy all the files to the router | ||
| + | scp -r v2ray root@miwifi.com:/ | ||
| + | Add execution permission | ||
| + | chmod +x v2ray | ||
| + | chmod +x v2ctl | ||
| + | Update the config.json, | ||
| + | ./v2ray --config=config.json | ||
| + | Testing the connection | ||
| + | curl -x socks5:// | ||
| + | Reference | ||
| + | - https:// | ||
| ===== Reference ===== | ===== Reference ===== | ||
| Line 55: | Line 67: | ||
| { | { | ||
| " | " | ||
| - | " | + | " |
| + | " | ||
| " | " | ||
| " | " | ||
| " | " | ||
| { | { | ||
| - | " | + | " |
| " | " | ||
| " | " | ||
| Line 67: | Line 80: | ||
| }, | }, | ||
| " | " | ||
| - | " | + | " |
| + | " | ||
| + | " | ||
| + | }, | ||
| " | " | ||
| " | " | ||
| Line 95: | Line 111: | ||
| } | } | ||
| ] | ] | ||
| - | } | + | |
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| } | } | ||
| </ | </ | ||
| Line 103: | Line 124: | ||
| <code json> | <code json> | ||
| { | { | ||
| - | | + | |
| - | "hosts": | + | "servers": |
| - | "domain: | + | "1.1.1.1" |
| - | "domain: | + | ] |
| - | "domain: | + | }, |
| - | "domain:wikipedia.org": "www.wikimedia.org" | + | "inbounds": |
| - | | + | { |
| - | "servers": | + | |
| - | "1.1.1.1", | + | "protocol": "socks", |
| - | | + | " |
| - | "address": "114.114.114.114", | + | "auth": "noauth", |
| - | "domains": [ | + | |
| - | " | + | "userLevel": |
| - | | + | }, |
| - | "port": | + | |
| - | }, | + | "destOverride": |
| - | "8.8.8.8", | + | |
| - | | + | "tls" |
| - | ] | + | ], |
| + | "enabled": | ||
| + | }, | ||
| + | "tag": "socks" | ||
| }, | }, | ||
| - | "inbounds": | + | |
| - | { | + | |
| - | "listen": "127.0.0.1", | + | " |
| - | "port": | + | " |
| - | " | + | |
| - | " | + | }, |
| - | "auth": "noauth", | + | " |
| - | "ip": "127.0.0.1", | + | } |
| - | "udp": | + | ], |
| - | }, | + | " |
| - | "sniffing": { | + | "loglevel": "warning" |
| - | "destOverride": | + | }, |
| - | | + | "outbounds": |
| - | " | + | { |
| - | ], | + | " |
| - | "enabled": true | + | " |
| - | }, | + | }, |
| - | "tag": "socks-inbound" | + | " |
| + | " | ||
| + | "vnext": | ||
| + | { | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | "alterId": | ||
| + | | ||
| + | "level": | ||
| + | " | ||
| + | } | ||
| + | | ||
| + | } | ||
| + | ] | ||
| + | | ||
| + | "streamSettings": { | ||
| + | "network": "ws", | ||
| + | " | ||
| + | "tlssettings": | ||
| + | " | ||
| + | "serverName": "" | ||
| }, | }, | ||
| - | { | + | |
| - | | + | "connectionReuse": |
| - | | + | "headers": |
| - | | + | "Host": "" |
| - | | + | }, |
| - | " | + | "path": "xxxxx" |
| - | | + | } |
| - | | + | }, |
| - | } | + | "tag": "proxy" |
| - | ], | + | |
| - | "log": { | + | |
| - | " | + | |
| }, | }, | ||
| - | | + | { |
| - | " | + | " |
| - | { | + | " |
| - | " | + | " |
| - | " | + | }, |
| - | " | + | { |
| - | { | + | " |
| - | " | + | " |
| - | " | + | "response": { |
| - | " | + | "type": "http" |
| - | { | + | |
| - | " | + | |
| - | } | + | |
| - | ] | + | |
| - | } | + | |
| - | ] | + | |
| - | }, | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | }, | + | |
| - | " | + | |
| - | }, | + | |
| - | " | + | |
| - | } | + | |
| - | }, | + | |
| - | | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | }, | + | |
| - | { | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | | + | |
| - | ], | + | |
| - | | + | |
| - | "levels": | + | |
| - | | + | |
| - | " | + | |
| - | " | + | |
| - | } | + | |
| - | }, | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| } | } | ||
| + | }, | ||
| + | " | ||
| + | } | ||
| + | ], | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| }, | }, | ||
| - | "routing": { | + | "system": { |
| - | "domainStrategy": | + | "statsInboundUplink": |
| - | "rules": | + | "statsInboundDownlink": |
| - | { | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | " | + | |
| - | }, | + | |
| - | { | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | " | + | |
| - | }, | + | |
| - | { | + | |
| - | " | + | |
| - | " | + | |
| - | ], | + | |
| - | " | + | |
| - | " | + | |
| - | } | + | |
| - | ] | + | |
| } | } | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | ] | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | ==== v2ray with nginx ==== | ||
| + | - https:// | ||
| + | |||
/var/www/dokuwiki/wiki/data/attic/linux/v2ray.1563025729.txt.gz · Last modified: 2019/07/13 21:48 by percy
