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:05] – [Mac Install] 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 101: | Line 122: | ||
==== Config file for client ==== | ==== Config file for client ==== | ||
- | <file json> | + | <code json> |
{ | { | ||
- | | + | |
- | "hosts": { | + | " |
- | "domain:github.io": "pages.github.com", | + | " |
- | "domain:shadowsocks.org": "electronicsrealm.com", | + | ] |
- | "domain:v2ray.com": "www.vicemc.net", | + | }, |
- | "domain:wikipedia.org": "www.wikimedia.org" | + | " |
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | "auth": " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | " | ||
+ | }, | ||
+ | | ||
+ | }, | ||
+ | { | ||
+ | "port": | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | "address" | ||
+ | "port": | ||
+ | | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
}, | }, | ||
- | "servers": | + | "wssettings": { |
- | " | + | "connectionReuse": |
- | | + | "headers": { |
- | "address": | + | "Host": "" |
- | "domains": | + | }, |
- | " | + | "path": "xxxxx" |
- | ], | + | |
- | " | + | |
- | }, | + | |
- | " | + | |
- | " | + | |
- | ] | + | |
- | }, | + | |
- | " | + | |
- | | + | |
- | "listen": "127.0.0.1", | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | ], | + | |
- | " | + | |
- | }, | + | |
- | | + | |
} | } | ||
- | ], | + | }, |
- | "log": { | + | "tag": "proxy" |
- | " | + | |
}, | }, | ||
- | | + | { |
- | " | + | " |
- | { | + | " |
- | " | + | " |
- | " | + | }, |
- | " | + | { |
- | { | + | " |
- | " | + | " |
- | " | + | "response": { |
- | " | + | "type": "http" |
- | { | + | |
- | " | + | |
- | } | + | |
- | ] | + | |
- | } | + | |
- | ] | + | |
- | }, | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | " | + | |
- | }, | + | |
- | " | + | |
- | } | + | |
- | }, | + | |
- | | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | | + | |
- | ], | + | |
- | | + | |
- | "levels": | + | |
- | | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | }, | + | |
- | " | + | |
- | " | + | |
- | " | + | |
} | } | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
}, | }, | ||
- | "routing": { | + | "system": { |
- | "domainStrategy": | + | "statsInboundUplink": |
- | "rules": | + | "statsInboundDownlink": |
- | { | + | |
- | " | + | |
- | " | + | |
- | ], | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | ], | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | ], | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | ] | + | |
} | } | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | ] | ||
} | } | ||
- | </file> | + | </code> |
+ | |||
+ | ==== v2ray with nginx ==== | ||
+ | - https:// | ||
/var/www/dokuwiki/wiki/data/attic/linux/v2ray.1563023147.txt.gz · Last modified: 2019/07/13 21:05 by percy