v2ray & Trojan Deployment
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Documentazione
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- docker, linux, nginx, raspberry-pi
- Ambito
- devops, documentation, networking
Direzione di ricerca
The issue names no repository file, test, or entry point; first inspect the repository's contribution and documentation structure to find where deployment tips belong. Confirm the proposed V2Ray and Trojan instructions, links, platform coverage, and configuration examples are suitable for the project before adding the guide.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
1.服务端一键安装
https://malagege.github.io/blog/2021/03/28/%E5%9C%A8-Raspberry-Pi-%E5%BB%BA%E7%BD%AE-V2ray/
https://uzbox.com/v2raydown.html
bash <(curl -sL https://raw.githubusercontent.com/hiifeng/v2ray/main/install_v2ray.sh)
2.使用 Docker 来部署 V2Ray Server
https://malagege.github.io/blog/2021/03/28/%E5%9C%A8-Raspberry-Pi-%E5%BB%BA%E7%BD%AE-V2ray/
https://github.com/alphacodinghub/v2ray-nginx-docker
3.Trojan docker 服务端搭建(支持 Arm64, Arm64v8,RPI 4B 是 Arm64v8):
https://hub.docker.com/r/teddysun/trojan
4.Linux 客户端
linux 客户端安装(树莓派通用):
https://github.com/v2fly/fhs-install-v2ray
https://dm116.github.io/2020/04/01/configuration-of-v2ray-client-and-server-with-cdn/
https://programmer.ink/think/linux-raspberry-pie-installation-v2ray-client.html
curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
chmod +x install-release.sh
###指定局域网代理来安装 Linux 客户端:
./install-release.sh -p http://192.168.1.20:7890
在 PC(或手机)中,配置 V2Ray 客户端:
vim /usr/local/etc/v2ray/config.json
{
"log": {
"loglevel": "warning",
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log"
},
// in
"inbounds": [
{
"port": 1081,
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"settings": {
"auth": "noauth",
"udp": true
}
},
{
"port": 1080,
"protocol": "http",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"settings": {
"auth": "noauth",
"udp": false
}
}
],
// out
"outbounds": [
{
"tag":"proxy",
"protocol":"vmess",
"settings": {
"vnext": [
{
"address": "myvmserver.com",
"port": 443,
"users": [
{
"id": "xxxx-43bd-4749-bd60-xxxx",
"alterId": 16
}
]
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"wsSettings": {
"path": "/serverpath"
}
},
"mux": {
"enabled": true
}
},
{
"protocol": "freedom",
"settings":{},
"tag": "direct"
},
{
"protocol": "blackhole",
"settings":{},
"tag": "adblock"
}
],
// route
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"outboundTag": "adblock",
"domain": [
"tanx.com",
"googeadsserving.cn",
"baidu.com"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:cn", // 中国大陆的 IP
"geoip:private" // 私有地址 IP,如路由器等
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:cn", // 中国大陆主流网站的域名
"domain:baidu.com",
"domain:taobao.com",
"domain:aliyun.com",
"domain:zhihu.com",
"domain:cnblogs.com",
"domain:runoob.com",
"domain:freebuf.com",
"domain:mozilla.org",
"domain:csdn.net",
"domain:jd.com"
]
}
]
}
}
启动服务
systemctl enable v2ray; systemctl start v2ray
上述配置要更改的地方是你的 vmess 服务器 address,id, alterId, wsSettings 里面的 path。上述配置会把除局域网(比如访问路由器)以外的所有流量转发至你的服务器。
在 Windows 和 macOS 中,配置文件通常是 V2Ray 同目录下的 config.json 文件。直接运行 v2ray 或 v2ray.exe 即可。
在 Linux 中,配置文件通常位于 /etc/v2ray/ 或 /usr/local/etc/v2ray/ 目录下。运行 v2ray --config=/etc/v2ray/config.json,或使用 systemd 等工具将 V2Ray 作为服务在后台运行。
更多详细的说明可以参考 配置文档 和 新白话文指南 .
验证 Proxy 是否工作(12.34.56.74 为 v2ray server地址):
$ curl -sSx socks5h://127.0.0.1:1081 http://ifconfig.co
12.34.56.78
$ curl -sSx http://127.0.0.1:1080 http://ifconfig.co
12.34.56.78
$ curl https://www.google.com
如果出现这个错误, 检测服务器端的 SSL 证书是否过期。
OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to xxx
5.Mac ClashX 客户端配置
新版语法
# VMess
- name: "v2ray"
type: vmess
server: xx.xx.xx.yy
port: 443
uuid: zzzzzzz-tttt-zzzz-xxxxxx-xxxxxxx
alterId: 16
cipher: auto
udp: true
tls: true
skip-cert-verify: true
# tls-hostname: myvmserver.com
network: ws
ws-opts:
path: /serverpath
headers:
Host: myvmserver.com
6.VLESS 一键安装
bash <(curl -sL https://raw.githubusercontent.com/hiifeng/v2ray/main/install_v2ray.sh)
7.V2rayU 客户端 的 vless + TLS + WS 配置
在 V2rayU 的配置里面,粘贴 json 配置,更改其中的 domain_name 为 vless 服务器域名, id 为 uuid, ws 的 path 为服务端路径即可。
{
"inbounds": [
{
"port": 1080,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
}
},
{
"port": 1090,
"listen": "127.0.0.1",
"protocol": "http",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"settings": {
"auth": "noauth",
"udp": false
}
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "domain_name.com",
"port": 443,
"users": [
{
"id": "xxxx-b5f2-4641-bdc0-xxxx",
"encryption": "none"
}
]
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"serverName": "domain_name.com"
},
"wsSettings": {
"path": "/xxx"
}
}
}
]
}
同时配置 HTTP/Socket 的本地代理:
https://iitii.github.io/2020/02/04/1/
8.VMess 客户端 JSON 配置 (For Linux host v2ray, V2RayU on Mac/Linux)
https://dm116.github.io/2020/04/01/configuration-of-v2ray-client-and-server-with-cdn/
{
"log": {
"error": "",
"loglevel": "info",
"access": ""
},
"inbounds": [
{
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": false,
"auth": "noauth"
},
"port": "7890"
},
{
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"timeout": 360
},
"port": "1090"
}
],
"outbounds": [
{
"mux": {
"enabled": false,
"concurrency": 8
},
"protocol": "vmess",
"streamSettings": {
"wsSettings": {
"path": "/xxxxxxxx",
"headers": {
"host": ""
}
},
"tlsSettings": {
"allowInsecure": false
},
"security": "tls",
"network": "ws"
},
"tag": "proxy",
"settings": {
"vnext": [
{
"address": "xxx.com",
"users": [
{
"id": "xxx-43bd-xxxx-bd60-xxx",
"alterId": 0,
"level": 0,
"security": "auto"
}
],
"port": 443
}
]
}
},
{
"tag": "direct",
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIP",
"userLevel": 0
}
},
{
"tag": "block",
"protocol": "blackhole",
"settings": {
"response": {
"type": "none"
}
}
}
],
"dns": {},
"routing": {
"settings": {
"domainStrategy": "AsIs",
"rules": []
}
},
"transport": {}
}
- Lingua principale
- Python
- Stelle
- 5
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di davideuler/programming-tips
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
-
list tags for docker image Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
build milvus on Mac Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Tutte le issue di davideuler/programming-tips
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/skills#1811 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
speaches-ai/speaches#678 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
datalayer/mcp-compose#42 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
UKGovernmentBEIS/inspect_evals#2523 ·