Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

v2ray & Trojan Deployment

Abierto
#6 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Documentación
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
docker, linux, nginx, raspberry-pi

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

1.服务端一键安装

https://v2xtls.org/v2ray%e5%a4%9a%e5%90%88%e4%b8%80%e8%84%9a%e6%9c%ac%ef%bc%8c%e6%94%af%e6%8c%81vmesswebsockettlsnginx%e3%80%81vlesstcpxtls%e3%80%81vlesstcptls%e7%ad%89%e7%bb%84%e5%90%88/

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": {}
}
Lenguaje dominante
Python
Estrellas
5
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de davideuler/programming-tips

Todos los issues de davideuler/programming-tips

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.