Coder Social home page Coder Social logo

discussion's Introduction

Discussion

discussion's People

Contributors

kslr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

discussion's Issues

请教:v2ray 客户端Shadowsocks协议测试配置出错

Openwrt 17.04固件 V2ray 客户端配置Shadowsocks协议不通,测试配置提示如下:

root@LEDE:/etc/v2ray# v2ray -test -config /etc/v2ray/config.json
V2Ray 4.30.0 (OpenWrt) R1 (go1.15.2 linux/mips)
A unified platform for anti-censorship.
main: failed to read config files: [/etc/v2ray/config.json] > v2ray.com/core/main/json: failed to execute v2ctl to convert config file. > v2ray.com/core/common/platform/ctlcmd: failed to execute v2ctl:
v2ctl> Read config: /etc/v2ray/config.json
v2ray.com/core/infra/conf: 0 Shadowsocks server configured. > exit status 255

config.json内容如下:
{
"log": {
"loglevel": "warning",
"access": "/var/log/v2ray.access.log",
"error": "/var/log/v2ray.error.log"
},
"inbounds":[

                        {
               "protocol": "socks",
               "port": 1081,
               "settings": {
                   "auth": "noauth",
                    "udp": false,
                   "ip": "0.0.0.0",
                   "userLevel": 0
               }
             }
                    ],
    "outbounds": [
      {
       "protocol": "shadowsocks", 
       "settings": {
       "server": [
          {
        "address": "1.1.1.1",
        "port": 24030,
        "password": "123456",
        "method": "xchacha20-ietf-poly1305"
                             }
                   ]
      } 
     }      
  ]

}

systemd启动v2ray,使用confdir配置,服务启动失败

如下,使用[email protected]/目录增加20-usedir.conf,修改ExecStart为使用 -confdir选项,启动服务失败,
通过日志如下加粗处看到,v2ray程序选择了从STDIN获取配置文件,没有从目录获取配置文件。
目录内存放有00_log.json 03_routing.json 05_inbounds.json 06_outbounds.json

systemctl status v2ray@ws
[email protected] - V2Ray Service
Loaded: loaded (/etc/systemd/system/[email protected]; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/[email protected]
└─10-donot_touch_single_conf.conf, 20-usedir.conf
Active: failed (Result: exit-code) since Thu 2020-10-01 01:10:05 CST; 3s ago
Docs: https://www.v2fly.org/
Process: 129035 ExecStart=/usr/local/bin/v2ray -confdir /home/mistery/.local/share/v2ray/ws (code=exited, status=23)
Main PID: 129035 (code=exited, status=23)

Oct 01 01:10:04 vultr.guest systemd[1]: Started V2Ray Service.
Oct 01 01:10:05 vultr.guest v2ray[129035]: V2Ray 4.29.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.15.2 >
Oct 01 01:10:05 vultr.guest v2ray[129035]: A unified platform for anti-censorship.
Oct 01 01:10:05 vultr.guest v2ray[129035]: 2020/10/01 01:10:05 Using config from STDIN
Oct 01 01:10:05 vultr.guest v2ray[129035]: main: failed to read config files: [stdin:] > v2ray.com/core/main/json: fail>
Oct 01 01:10:05 vultr.guest v2ray[129035]: v2ctl> Read config: stdin:
Oct 01 01:10:05 vultr.guest v2ray[129035]: v2ctl> v2ray.com/core/infra/conf/serial: failed to read config file > EOF > >
Oct 01 01:10:05 vultr.guest systemd[1]: [email protected]: Main process exited, code=exited, status=23/n/a
Oct 01 01:10:05 vultr.guest systemd[1]: [email protected]: Failed with result 'exit-code'.
lines 1-18/18 (END)

V4.28.2 手动安装,无法启动 服务。 (code=exited, status=203/EXEC)

-- Logs begin at 六 2020-09-19 08:35:56 CST, end at 六 2020-09-19 01:26:27 CST. --
9月 19 01:05:40 localhost.localdomain systemd[1]: Started V2Ray Service.
9月 19 01:05:40 localhost.localdomain systemd[1]: v2ray.service: main process exited, code=exited, status=203/EXEC
9月 19 01:05:40 localhost.localdomain systemd[1]: Unit v2ray.service entered failed state.
9月 19 01:05:40 localhost.localdomain systemd[1]: v2ray.service failed.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service holdoff time over, scheduling restart.
9月 19 01:05:41 localhost.localdomain systemd[1]: Stopped V2Ray Service.
9月 19 01:05:41 localhost.localdomain systemd[1]: Started V2Ray Service.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service: main process exited, code=exited, status=203/EXEC
9月 19 01:05:41 localhost.localdomain systemd[1]: Unit v2ray.service entered failed state.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service failed.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service holdoff time over, scheduling restart.
9月 19 01:05:41 localhost.localdomain systemd[1]: Stopped V2Ray Service.
9月 19 01:05:41 localhost.localdomain systemd[1]: Started V2Ray Service.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service: main process exited, code=exited, status=203/EXEC
9月 19 01:05:41 localhost.localdomain systemd[1]: Unit v2ray.service entered failed state.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service failed.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service holdoff time over, scheduling restart.
9月 19 01:05:41 localhost.localdomain systemd[1]: Stopped V2Ray Service.
9月 19 01:05:41 localhost.localdomain systemd[1]: Started V2Ray Service.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service: main process exited, code=exited, status=203/EXEC
9月 19 01:05:41 localhost.localdomain systemd[1]: Unit v2ray.service entered failed state.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service failed.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service holdoff time over, scheduling restart.
9月 19 01:05:41 localhost.localdomain systemd[1]: Stopped V2Ray Service.
9月 19 01:05:41 localhost.localdomain systemd[1]: Started V2Ray Service.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service: main process exited, code=exited, status=203/EXEC
9月 19 01:05:41 localhost.localdomain systemd[1]: Unit v2ray.service entered failed state.
9月 19 01:05:41 localhost.localdomain systemd[1]: v2ray.service failed.
9月 19 01:05:42 localhost.localdomain systemd[1]: v2ray.service holdoff time over, scheduling restart.
9月 19 01:05:42 localhost.localdomain systemd[1]: Stopped V2Ray Service.
9月 19 01:05:42 localhost.localdomain systemd[1]: start request repeated too quickly for v2ray.service
9月 19 01:05:42 localhost.localdomain systemd[1]: Failed to start V2Ray Service.
9月 19 01:05:42 localhost.localdomain systemd[1]: Unit v2ray.service entered failed state.
9月 19 01:05:42 localhost.localdomain systemd[1]: v2ray.service failed.
9月 19 01:16:37 localhost.localdomain systemd[1]: Started V2Ray Service.
9月 19 01:16:37 localhost.localdomain systemd[1]: v2ray.service: main process exited, code=exited, status=203/EXEC
9月 19 01:16:37 localhost.localdomain systemd[1]: Unit v2ray.service entered failed state.
9月 19 01:16:37 localhost.localdomain systemd[1]: v2ray.service failed.
9月 19 01:16:38 localhost.localdomain systemd[1]: v2ray.service holdoff time over, scheduling restart.
9月 19 01:16:38 localhost.localdomain systemd[1]: Stopped V2Ray Service.
9月 19 01:16:38 localhost.localdomain systemd[1]: Started V2Ray Service.
9月 19 01:16:38 localhost.localdomain systemd[1]: v2ray.service: main process exited, code=exited, status=203/EXEC

局域网内链式代理使用vless + TLS的问题

目前局域网内只有一台电脑A能够稳定的访问外网,但是局域网内的电脑之间互访是没有问题的。因此在A上搭建了一个socks5代理服务器,平时通过A访问国内网站没有问题。

没有A电脑的权限,因此无法在A电脑上搭建v2ray。我用的配置为VLESS +XTLS,请问有办法通过A来代理实现科学上网吗

即my computer ---> A ----> v2ray server

其中:
my computer ---> A,同在一个局域网内,走socks5代理
A ---> v2ray server,使用VLESS + XTLS

请问能否给v2ray-core添加Webhooks?以自动构建Docker镜像

现在GitHub和Docker Hub都没有这种订阅发布自动触发的功能,如果使用GitHub的API的话则必须部署服务。

请问能否开放给v2ray-core添加Webhooks的申请?为需要关注发布情况,自动构建的功能提供支持。比如我的Docker Hub镜像创建了一个触发器:

https://hub.docker.com/api/build/v1/source/cd3abdd1-ae0b-4823-b131-d3e055a7a5d3/trigger/7d716dab-9116-4084-9f06-1f52fec5d31e/call/

需要在v2ray-core库的设置中添加一个Webhooks:

  • Payload URL 填:https://hub.docker.com/api/build/v1/source/cd3abdd1-ae0b-4823-b131-d3e055a7a5d3/trigger/7d716dab-9116-4084-9f06-1f52fec5d31e/call/
  • Which events would you like to trigger this webhook? 选:Let me select individual events.,并勾选:Releases
  • Active 勾选

这样每次v2ray-core发布新版后Docker Hub镜像就会得到通知,自动进行构建。

direct mode无法相容origin mode

測试了 2.3/2.4 preview版本,二端origin没问题,二端direct也没问题。

若server改为direct mode,client端使用origin mode,会出现

[Warning] [3847769989] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vless/inbound: UID is not able to use xtls-rprx-origin

若server改为origin,client端使用direct mode,会出现

[Warning] [2099326943] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vless/inbound: UID is not able to use xtls-rprx-direct

简单说就是互不相容,按作者的说法,direct mode应兼容origin mode.(或是我理解错误?)

用了V2RAY IE网站打开报错 这可能是因为该站点使用过期的或不安全的 TLS 安全设置

没有V2RAY之前 IE打开可以访问网站 ,用了V2RAY IE打开会报错, 网站是HTTPS 支持TLS1.0 报错内容如果

无法安全地连接到此页面

这可能是因为该站点使用过期的或不安全的 TLS 安全设置。如果这种情况持续发生,请与网站的所有者联系。

TLS 安全设置未设置为默认设置,这也可能导致此错误。

尝试此操作:
我用IE本地网络可以正常打开,这些HTTPS网站的,连接上V2RAY就是不行了。是我哪里设置出错了,还是新版本V2RAY 不支持TLS1.0 导致这些网站打不开呢 这些网站同时也支持 TLS 1.1 1.2 在 WIN10 IE上面就不行 在谷歌浏览器上面确可以打开
就是在V2RAY全局模式下打不开这些网站

关于安装脚本更新和proxy protocol的问题

有两个问题想请教一下
1.为了使用unix socket与haproxy通信,修改了v2ray.service这个文件里的配置,如果在vps上用安装脚本更新了v2ray,那修改过的service文件是否会被覆盖?

2.目前最新版本(4.27.5)的ds是否支持proxy protocol?

问一下大家fail2ban的过滤规则怎么写啊?

如题,想要问一下大家fail2ban的过滤规则都是怎么写的啊?
模仿着nginx的规则,抄完感觉怪怪的,总感觉匹配不上

/etc/fail2ban/filter.d/v2ray.conf

[Definition]

failregex = ^.* <HOST>\:<PORT> rejected  v2ray.com\/core\/proxy\/vmess\/encoding\: invalid user$
            ^.* <HOST>\:<PORT> rejected  v2ray.com\/core\/proxy\/vmess\/encoding\: duplicated session id, possibly under replay attack$

ignoreregex =

datepattern = {^LN-BEG}%%ExY(?P<_sep>[-/.])%%m(?P=_sep)%%d[T ]%%H:%%M:%%S(?:[.,]%%f)?(?:\s*%%z)?
              ^[^\[]*\[({DATE})
              {^LN-BEG}

# datepattern is copied from #nginx-botsearch.conf

/etc/fail2ban/jail.local

[v2ray]
enabled = true
filter = v2ray
action   = firewallcmd-allports[name=v2ray, protocol=all]
           %(action_abuseipdb)s[abuseipdb_apikey="<***API密钥***>", abuseipdb_category="14,19,21"]
logpath = /var/log/v2ray/access.log
maxretry = 1
bantime = 35136000
ignoreip = 127.0.0.1, ::1, <我自己的IP>
findtime = 300

起因是我的服务器上的v2ray被人放过这种重放攻击,每天【端口扫描+漏洞试探+暴力破解】的服务器比我正常访客还多。
vultr的防火墙不干活,明明写了白名单IP范围,可不认识的IP还是进来了

考虑一下,failregex写成 failregex = ^.* <HOST>\:<PORT> rejected v2ray.*$ 是不是更好一点?会不会把我自己因为网络问题连接失败的也算上?

增加一个反向tcp连接的出口outbounds类型

目前v2ray的outbounds出口方向都是当前结点作为客户端对目标发起一个连接,
我的想法是增加一个outbound方向的监听端口,让目标对我发起tcp连接,类似于内网穿透
这样就能让处于内网的设备也能作为代理。

v2ray stops working after upgrade

I'm using v2ray as proxy. I don't own the server.

V2ray stops working after upgrade from 4.26.0 to 4.30.0.
When I run 4.26.0 executable manually, it works as before.

in log it says:

[Debug] v2ray.com/core/app/log: Logger started
[Debug] v2ray.com/core/app/proxyman/inbound: creating stream worker on 0.0.0.0:1080
[Info] v2ray.com/core/transport/internet/tcp: listening TCP on 0.0.0.0:1080
[Warning] v2ray.com/core: V2Ray 4.30.0 started
[Info] v2ray.com/core/proxy/socks: TCP Connect request to tcp:www.apple.com:443
[Info] v2ray.com/core/app/dispatcher: default route for tcp:www.apple.com:443
[Info] v2ray.com/core/transport/internet/websocket: creating connection to tcp:[data expunged]
[Info] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:www.apple.com:443 via tcp:[data expunged]
[Info] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: Failed To Decrypt Length > cipher: message authentication failed
[Info] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > v2ray.com/core/proxy/socks: failed to transport all TCP response > io: read/write on closed pipe
[Debug] v2ray.com/core/app/log: Logger closing

my client config:

{
  "log": {
    "loglevel": "debug"
  },
  "inbounds": [
    {
      "port": 1080,
      "protocol": "socks",
      "settings": {
        "auth": "noauth"
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "proxy.addr",
            "port": 6789,
            "users": [
              {
                "id": "some-uuid",
                "alterId":"some number"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "wsSettings": {
          "connectionReuse": true,
          "path": "/proxy"
        }
      }
    }
  ],
  "routing": {
    "domainStrategy": ""
  }
}

I wonder if I have to modify the config to make the new version work or the new version is not compatible so I have to use the old version.

v2ray专用域名无法在墙内获得解析

先说一下,我只是个算善于用google的小白,我知道这个问题与软件无关,但是没有其他可以学习的地方了。
失败客户端环境:windows v2ray 2.60.0,仅IPv4,WebSocket + TLS + Web+cdn(cloudflare)。昨天开始我的域名在墙内无法获得解析了,用了墙内各家DNS服务器都不行(不下于10家,nslookup 加参数查询,墙外是正常的),v2ray debug如下:
2020/09/21 09:58:15 [Info] [4209195477] v2ray.com/core/proxy/socks: TCP Connect request to tcp:域名:443
2020/09/21 09:58:15 [Info] [2051461616] v2ray.com/core/proxy/socks: TCP Connect request to tcp:域名:443
2020/09/21 09:58:15 [Info] [4209195477] v2ray.com/core/app/dispatcher: sniffed domain: 域名
2020/09/21 09:58:15 [Debug] v2ray.com/core/app/dns: UDP:上海联通DNS:53 querying DNS for: 域名.
2020/09/21 09:58:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:上海联通DNS:53
2020/09/21 09:58:15 [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:上海联通DNS:53
2020/09/21 09:58:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:上海联通DNS:53
2020/09/21 09:58:15 [Info] v2ray.com/core/app/dispatcher: taking detour [direct] for [udp:上海联通DNS:53]
2020/09/21 09:58:15 [Info] v2ray.com/core/proxy/freedom: opening connection to udp:上海联通DNS:53
2020/09/21 09:58:15 [Info] [2051461616] v2ray.com/core/app/dispatcher: sniffed domain: 域名
2020/09/21 09:58:15 [Debug] v2ray.com/core/app/dns: UDP:上海联通DNS:53 querying DNS for: 域名.
2020/09/21 09:58:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:上海联通DNS:53
2020/09/21 09:58:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:上海联通DNS:53
2020/09/21 09:58:15 [Info] v2ray.com/core/app/dns: UDP:上海联通DNS:53 got answere: 域名. TypeAAAA -> [] 4.0002ms
2020/09/21 09:58:15 [Debug] v2ray.com/core/app/dns: UDP:上海联通DNS:53 updating IP records for domain:域名.
2020/09/21 09:58:15 [Info] v2ray.com/core/app/dns: UDP:上海联通DNS:53 got answere: 域名. TypeAAAA -> [] 3.0001ms
2020/09/21 09:58:15 [Debug] v2ray.com/core/app/dns: UDP:上海联通DNS:53 updating IP records for domain:域名.
2020/09/21 09:58:15 [Info] v2ray.com/core/app/dns: UDP:上海联通DNS:53 got answere: 域名. TypeA -> [] 35.002ms
2020/09/21 09:58:15 [Debug] v2ray.com/core/app/dns: UDP:上海联通DNS:53 updating IP records for domain:域名.
2020/09/21 09:58:15 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain 域名 at server UDP:上海联通DNS:53 > rcode: 2
2020/09/21 09:58:15 [Debug] v2ray.com/core/app/dns: UDP:1.1.1.1:53 querying DNS for: 域名.
2020/09/21 09:58:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2020/09/21 09:58:15 [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:1.1.1.1:53
2020/09/21 09:58:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2020/09/21 09:58:15 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain 域名 at server UDP:上海联通DNS:53 > rcode: 2
2020/09/21 09:58:15 [Debug] v2ray.com/core/app/dns: UDP:1.1.1.1:53 querying DNS for: 域名.
2020/09/21 09:58:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2020/09/21 09:58:15 [Info] v2ray.com/core/app/dispatcher: default route for udp:1.1.1.1:53
2020/09/21 09:58:15 [Info] v2ray.com/core/common/mux: dispatching request to udp:1.1.1.1:53
2020/09/21 09:58:15 [Info] v2ray.com/core/transport/internet/websocket: creating connection to tcp:域名:443
2020/09/21 09:58:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2020/09/21 09:58:16 [Warning] failed to handler mux client connection > v2ray.com/core/proxy/vmess/outbound: failed to find an available destination > v2ray.com/core/common/retry: [v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://域名/helloworld): > dial tcp: lookup 域名: getaddrinfow: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://域名/helloworld): > dial tcp: lookup 域名: no such host v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://域名/helloworld): > dial tcp: lookup 域名: getaddrinfow: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.] > v2ray.com/core/common/retry: all retry attempts failed
2020/09/21 09:58:19 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain 域名 at server UDP:1.1.1.1:53 > context deadline exceeded

临时解决方案,我在墙外用自己的vps dig 了一下域名,然后写入localhost,config文件中将专用域名改为localhost解析,目前正常。

另外我在另一个环境中是有IPv6的,查询DNS也是V6的,能够得到解析IP。

三个问题
1、这样算常态吗?
2、有什么长久一点的解决方案吗?
3、这算墙的一种攻击吗?背后的原理是什么,除了换域名外,要怎么做方便避坑?

关于 fallback vless 和 ws+tls+cdn 共用问题

以前是通过 caddy 分流到不同的域名,一个域名负责连接 cdn,另一个域名直连
现在想把 vless 放在前面(反正 caddy 也就一个页面,为了防检测)。
在 v2ray 中尝试让两个节点共用一个 443 端口:

{
    "tag": "A",
    "port": 443,
    "listen": "0.0.0.0",
    "protocol": "vmess",
    "streamSettings": {
      "network": "ws",
      "security": "tls",
      "tlsSettings": {
        "allowInsecure": false,
        "serverName": "[域名1]",
        "certificates": [
          {
            "certificateFile": "/etc/ssl/test.crt",
            "keyFile": "/etc/ssl/test.key"
          }
        ]
      },
      "wsSettings": {
        "path": "/ws",
        "headers": {
          "Host": "[域名1]"
        }
      },
      "quicSettings": {},
      "kcpSettings": {},
      "httpSettings": {},
      "tcpSettings": {}
    },
    "settings": {
      "clients": [
        {

          "alterId": 0,
          "id": "00000000-0000-0000-0000-000000000000"
        }
      ]
    }
  },
  {
    "tag": "B",
    "port": 443,
    "listen": "0.0.0.0",
    "protocol": "vless",
    "streamSettings": {
      "network": "tcp",
      "security": "xtls",
      "xtlsSettings": {
        "allowInsecure": false,
        "serverName": "[域名2]",
        "alpn": [
          "http/1.1"
        ],
        "certificates": [
          {
            "certificateFile": "/etc/ssl/test.crt",
            "keyFile": "/etc/ssl/test.key"
          }
        ]
      },
      "tlsSettings": {},
      "quicSettings": {},
      "kcpSettings": {},
      "httpSettings": {},
      "tcpSettings": {},
      "wsSettings": {}
    },
    "settings": {
      "clients": [
        {
          "flow": "xtls-rprx-origin",
          "id": "00000000-0000-0000-0000-000000000000"
        },
      ],
      "decryption": "none",
      "fallbacks": [
        {
          "dest": 80
        }
      ]
    }
  }

发现两个节点在 v2ray 这里都能使用,但 fallback 到 caddy 的网页有时候就会 404。
至于为什么 ws 不用 vless fallback 到 caddy,那是因为 vless 现在还不支持共享链接,很多下游(clash 等等)也还不支持,我想保证兼容性。vless 这边有 xtls 回退到 vmess,而用 ws cdn 没法用 xtls。
想问问现在(或未来)有什么手段能解决这个问题吗?(比如 sni 分流?)

关于AEAD与VLESS强制客户端与服务端版本一致性的一些疑惑

启用AEAD与VLESS的话,版本不一致会导致客户端无法连接服务端?

我在VPS上搭了v2ray服务端,并分享给最亲近的几个人使用。如果强制要求版本一致,岂不是只能让所有人先同时更新客户端,然后我再去更新服务端?如果我先更新了服务端,那些尚未更新客户端的亲朋好友不就因为连不上服务端而无法更新客户端了么?

那些建机场的怎么办?不可能保证所有的客户端都能与服务端版本一致啊?

How to pass V2ray traffic over redsocks ?

Hi , for accessing internet i should use redsocks + iptables ( for connecting to socks servers and then internet access ) , my question is how can i pass v2ray traffic over redsocks so then i can use open internet access ? ( i will use v2ray on proxy server mode on apps like chrome etc )

which iptables rules i should use for that ?
is it possible at all ?

my current iptables rules which i'm using for redsocks is these :

iptables -F
iptables -Z
iptables -X
iptables -t nat -F
iptables -t nat -Z
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -Z
iptables -t mangle -X
iptables -t nat -N REDSOCKS2
iptables -t mangle -N REDSOCKS2
iptables -t mangle -N REDSOCKS2_MARK

iptables -t nat -A REDSOCKS2 -d 127.0.0.0/8 -j RETURN
iptables -t nat -A REDSOCKS2 -d 169.254.0.0/16 -j RETURN
iptables -t nat -A REDSOCKS2 -d 172.16.0.0/12 -j RETURN
iptables -t nat -A REDSOCKS2 -d 192.168.0.0/16 -j RETURN
iptables -t nat -A REDSOCKS2 -d 224.0.0.0/4 -j RETURN
iptables -t nat -A REDSOCKS2 -d 240.0.0.0/4 -j RETURN
iptables -t nat -A REDSOCKS2 -p tcp -j REDIRECT --to-ports 12345
iptables -t nat -A OUTPUT -p tcp --dport 443 -j REDSOCKS2
iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDSOCKS2
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDSOCKS2
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDSOCKS2
iptables -t nat -A PREROUTING -s 10.42.0.0/24 -p tcp -j REDIRECT --to-ports 12345
sysctl -w net.ipv4.ip_forward=1`

Thank you.

vless和vmess可以同时运行吗?

/usr/local/bin/v2ray -config /etc/v2ray/config_vmess.json -config /etc/v2ray/config_vless.json

单个配置文件启动都是可以正常使用, 但是如果这样一起启动的话, 后面那个配置文件可以启动, 前面的会失效, 如果测速的话, 会报错, 日志如下

2020/09/21 22:16:38 [Warning] v2ray.com/core/transport/internet/websocket: accepting PROXY protocol
2020/09/21 22:16:38 [Warning] v2ray.com/core: V2Ray 4.28.2 started
2020/09/21 22:16:44 116.6.127.234:59832 accepted udp:1.1.1.1:53 email:[email protected]
2020/09/21 22:16:45 116.6.127.234:59836 accepted udp:1.1.1.1:53 email:[email protected]
2020/09/21 22:16:46 116.6.127.234:59840 accepted udp:1.1.1.1:53 email:[email protected]
2020/09/21 22:16:47 116.6.127.234:59844 accepted udp:1.1.1.1:53 email:[email protected]
2020/09/21 22:16:47 116.6.127.234:59848 accepted tcp:connectivitycheck.gstatic.com:443 email:[email protected]
2020/09/21 22:16:50 [Warning] [278634071] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vless/inbound: invalid request from 116.6.127.234:59856 > v2ray.com/core/proxy/vless/encoding: failed to read request version > websocket: close 1000 (normal)
2020/09/21 22:16:50 116.6.127.234:59856 rejected v2ray.com/core/proxy/vless/encoding: failed to read request version > websocket: close 1000 (normal)

客户端用vless可以正常用, 用vmess配置去连接的话就是粗体部分报错. 是无法一起启动吗?

根据用户的源 IP 动态填入 clientIP

假设本机 V2Ray 开个的任意门协议,然后监听 53 端口用来接收 DNS 查询的流量,假设本机 IP 是 192.168.1.1

但是目前 clientIp 只能设置一个,在 DNS 查询的时候起作用

假设我用另一台 IP 为 192.168.1.2 的机器 DNS 地址设置为 192.168.1.1

这时候 V2Ray 可以知道是 192.168.1.2 这台机器连接了,然后把 192.168.1.2 这个 IP 当作 clientIp 来用

v2fly/v2ray-core#169

@Loyalsoldier

关于cloudflare.实现流量伪装的成功实践

这段时间在网上发现有大神讲了CDN的原理,好奇的实践了一把,果然好使

大神给的方法:

CDN识别流量是访问哪个网站的是根据请求头的Host来识别,所以这里要么host用我们的域名 ,要么我们伪装成我们的域名,这样都可以达到回源我们网站的请求。如果自己有域名也可以换自己的域名,域名也可以从第三方接入商cname

这里只给出V2ray客户端Config.json的代码:

"outbounds": [ { "tag": "proxy", "protocol": "vmess", "settings": { "vnext": [ { //这里的地址可以是Cloudfare,或者你能找到的最优的Cloudfare的IP地址 "address": "cloudflare.com", "port": 443, "users": [ { "id": "your UUID", //你的UUID "alterId": your alterid, //你的额外ID "security": "auto" } ] } ], }, "streamSettings": { "network": "ws", "security": "tls", //这个tlsSettings一定要有,不然貌似出现401 错误 "tlsSettings": { "allowInsecure": true, "serverName": "your VPS address" //你的VPS域名地址xxx.xxx或者你的cloudflare. worker 转换的地址xxx.workers.dev" }, "wsSettings": { "connectionReuse": true, "path": "your path", //你的路径 "headers": { "Host": "your VPS address" /你的VPS域名地址xxx.xxx或者你的cloudflare. worker 转换的地址xxx.workers.dev } } }, "mux": { "enabled": true, "concurrency": 8 } } }

这只是Vmess的配置,V2rayN也是一样的,只要把地址改造cloudflare.com,伪装域名改成你的VPS域名地址就行

目前只测试Vmess的方式,Vless应该也可以实现相同的伪装

关于xTLS加密数据流的疑问

xTLS是把tls加密过的数据不再加密,可如果tls协商的加密算法的不同,

v2ray客户端和服务器协商aes128cfb,浏览器和网站服务器协商chacha20或其他算法。

这会一个tls连接上产生不同的加密算法流?
这是否会成为特征?

能否降低下内存占用和体积

16M+128M的路由器资源对于 10MB之巨的v2 core来讲实在是捉襟见肘
即便使用upx压缩,仍有4MB不到的体积,
但是压缩之后,反而在运行阶段增加了对内存的占用(毕竟是要解压了运行的)适得其反
128M的内存运行v2之后基本已无太多可用内存

所以能否针对路由器SoC CPU的版本进行下程序优化或精简、降低下内存占用或体积。

谢谢。

请教一下 v2ray 配置的设计问题

一般使用 v2ray 程序的时候,都是使用json 格式文件,v2ray 读取 json 数据后,还需要使用 v2ctl 转换成 protobuf 格式,然后再对应成程序的数据结构,请问这个设计的初衷是什么啊?中间转换还依赖 v2ctl,这个不太合理。

建议v2ray支持yaml格式配置文件

体验了trojan-go的yaml格式配置,简直不要太爽,不用再担心json版我去掉(或注释掉)一项时,要把前面的逗号去掉,否则报错,也不用担心在json版里用了注释,json检验工具不通过的问题,而且不用再写各种双引号,花括号。总之,yaml格式配置,要比json更方便更不容易出错,希望能考虑一下支持yaml格式配置,大家如果支持的话,就来个👍吧!

请问如何通过第三方程序导入vmss配置

某站会不定期发布vmss配置, 可通过复制后从剪贴板导入v2ray, 现在我想做一个脚本, 自动抓取vmess的配置, 并直接导入到v2ray激活使用, 但现在不知如何导入到v2ray, 请问如何实现?

v2fly android二次打包木马?

https://www.virustotal.com/gui/file/090a9f47705fe00b60a7659ce926462943be2608e616359410fa0a3306646da4/detection

MD5	372335fc752ee6f45be46e36eb0e813f
SHA-1	bd99b545c6787aa7fd0efb70987ec2e38bdd8469
SHA-256	090a9f47705fe00b60a7659ce926462943be2608e616359410fa0a3306646da4
Vhash	6de928d71a108a59bf4029f31e0980f9
SSDEEP	786432:1h+8sKFYYFIigfdwY8TCwCNUXgu1sYFrH2Ift1iY8MyKOEZJ/r0e8ihoZskoee2I:yTKFNuVwYHwC1u1926DlFT9KekNe2I
File type	Android
Magic	Zip archive data
File size	47.33 MB (49624136 bytes)

这里可以下载到 https://apk4k.fun/app/com.v2ray.v2fly
还有这里:
https://android-top.com/apk/com.v2ray.v2fly
看起来是同一个文件

关于AES的提问

大佬好!
我没看源码,所以想问一下,目前V2对于AES部分一律采用的是软加密吗?
所以我有没有必要换一个支持AES的CPU的软路由?

v2rayN电脑客户端其中一个节点电脑端用不了,手机可用(更换旧版本的v2rayN已解决)

1.你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)

v2rayN:V3.26
v2ray-core:V4.31.1
系统:win7 64位

2.你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
使用chrome通过vmess访问google

3.你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)
网页无法访问,日志见下方

4.你期待看到的正确表现是怎样的?
正常访问google

5.请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

v2rayN电脑端服务器端配置:

{
"policy": null,
"log": {
"access": "",
"error": "",
"loglevel": "warning"
},
"inbounds": [
{
"tag": null,
"port": 443,
"listen": null,
"protocol": "vmess",
"sniffing": null,
"settings": {
"auth": null,
"udp": false,
"ip": null,
"address": null,
"clients": [
{
"id": "----",
"alterId": 0,
"email": "[email protected]",
"security": null,
"encryption": null,
"flow": null
}
],
"decryption": null
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"allowInsecure": true,
"serverName": "www..com"
},
"tcpSettings": null,
"kcpSettings": null,
"wsSettings": {
"connectionReuse": true,
"path": "/",
"headers": {
"Host": "www.
.com"
}
},
"httpSettings": null,
"quicSettings": null,
"xtlsSettings": null
}
}
],
"outbounds": null,
"stats": null,
"api": null,
"dns": null,
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": []
}
}

v2rayN电脑端客户端配置:
{
"policy": {
"system": {
"statsInboundUplink": true,
"statsInboundDownlink": true
}
},
"log": {
"access": "",
"error": "",
"loglevel": "warning"
},
"inbounds": [
{
"tag": "proxy",
"port": 1080,
"listen": "127.0.0.1",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
"settings": {
"auth": "noauth",
"udp": true,
"ip": null,
"address": null,
"clients": null,
"decryption": null
},
"streamSettings": null
},
{
"tag": "api",
"port": 4397,
"listen": "127.0.0.1",
"protocol": "dokodemo-door",
"sniffing": null,
"settings": {
"auth": null,
"udp": false,
"ip": null,
"address": "127.0.0.1",
"clients": null,
"decryption": null
},
"streamSettings": null
}
],
"outbounds": [
{
"tag": "proxy",
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "...",
"port": 443,
"users": [
{
"id": "----",
"alterId": 0,
"email": "[email protected]",
"security": "auto",
"encryption": null,
"flow": null
}
]
}
],
"servers": null,
"response": null
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"allowInsecure": true,
"serverName": "www..com"
},
"tcpSettings": null,
"kcpSettings": null,
"wsSettings": {
"connectionReuse": true,
"path": "/",
"headers": {
"Host": "www.
.com"
}
},
"httpSettings": null,
"quicSettings": null,
"xtlsSettings": null
},
"mux": {
"enabled": true,
"concurrency": 8
}
},
{
"tag": "direct",
"protocol": "freedom",
"settings": {
"vnext": null,
"servers": null,
"response": null
},
"streamSettings": null,
"mux": null
},
{
"tag": "block",
"protocol": "blackhole",
"settings": {
"vnext": null,
"servers": null,
"response": {
"type": "http"
}
},
"streamSettings": null,
"mux": null
}
],
"stats": {},
"api": {
"tag": "api",
"services": [
"StatsService"
]
},
"dns": null,
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"port": null,
"inboundTag": [
"api"
],
"outboundTag": "api",
"ip": null,
"domain": null
},
{
"type": "field",
"port": null,
"inboundTag": null,
"outboundTag": "proxy",
"ip": null,
"domain": [
"geosite:google",
"geosite:github",
"geosite:netflix",
"geosite:steam",
"geosite:telegram",
"geosite:tumblr",
"geosite:speedtest",
"geosite:bbc",
"domain:gvt1.com",
"domain:textnow.com",
"domain:twitch.tv",
"domain:wikileaks.org",
"domain:naver.com"
]
},
{
"type": "field",
"port": null,
"inboundTag": null,
"outboundTag": "proxy",
"ip": [
"91.108.4.0/22",
"91.108.8.0/22",
"91.108.12.0/22",
"91.108.20.0/22",
"91.108.36.0/23",
"91.108.38.0/23",
"91.108.56.0/22",
"149.154.160.0/20",
"149.154.164.0/22",
"149.154.172.0/22",
"74.125.0.0/16",
"173.194.0.0/16",
"172.217.0.0/16",
"216.58.200.0/24",
"216.58.220.0/24",
"91.108.56.116",
"91.108.56.0/24",
"109.239.140.0/24",
"149.154.167.0/24",
"149.154.175.0/24"
],
"domain": null
},
{
"type": "field",
"port": null,
"inboundTag": null,
"outboundTag": "direct",
"ip": null,
"domain": [
"domain:12306.com",
"domain:51ym.me",
"domain:52pojie.cn",
"domain:8686c.com",
"domain:abercrombie.com",
"domain:adobesc.com",
"domain:air-matters.com",
"domain:air-matters.io",
"domain:airtable.com",
"domain:akadns.net",
"domain:apache.org",
"domain:api.crisp.chat",
"domain:api.termius.com",
"domain:appshike.com",
"domain:appstore.com",
"domain:aweme.snssdk.com",
"domain:bababian.com",
"domain:battle.net",
"domain:beatsbydre.com",
"domain:bet365.com",
"domain:bilibili.cn",
"domain:ccgslb.com",
"domain:ccgslb.net",
"domain:chunbo.com",
"domain:chunboimg.com",
"domain:clashroyaleapp.com",
"domain:cloudsigma.com",
"domain:cloudxns.net",
"domain:cmfu.com",
"domain:culturedcode.com",
"domain:dct-cloud.com",
"domain:didialift.com",
"domain:douyutv.com",
"domain:duokan.com",
"domain:dytt8.net",
"domain:easou.com",
"domain:ecitic.net",
"domain:eclipse.org",
"domain:eudic.net",
"domain:ewqcxz.com",
"domain:fir.im",
"domain:frdic.com",
"domain:fresh-ideas.cc",
"domain:godic.net",
"domain:goodread.com",
"domain:haibian.com",
"domain:hdslb.net",
"domain:hollisterco.com",
"domain:hongxiu.com",
"domain:hxcdn.net",
"domain:images.unsplash.com",
"domain:img4me.com",
"domain:ipify.org",
"domain:ixdzs.com",
"domain:jd.hk",
"domain:jianshuapi.com",
"domain:jomodns.com",
"domain:jsboxbbs.com",
"domain:knewone.com",
"domain:kuaidi100.com",
"domain:lemicp.com",
"domain:letvcloud.com",
"domain:lizhi.io",
"domain:localizecdn.com",
"domain:lucifr.com",
"domain:luoo.net",
"domain:mai.tn",
"domain:maven.org",
"domain:miwifi.com",
"domain:moji.com",
"domain:moke.com",
"domain:mtalk.google.com",
"domain:mxhichina.com",
"domain:myqcloud.com",
"domain:myunlu.com",
"domain:netease.com",
"domain:nfoservers.com",
"domain:nssurge.com",
"domain:nuomi.com",
"domain:ourdvs.com",
"domain:overcast.fm",
"domain:paypal.com",
"domain:paypalobjects.com",
"domain:pgyer.com",
"domain:qdaily.com",
"domain:qdmm.com",
"domain:qin.io",
"domain:qingmang.me",
"domain:qingmang.mobi",
"domain:qqurl.com",
"domain:rarbg.to",
"domain:rrmj.tv",
"domain:ruguoapp.com",
"domain:sm.ms",
"domain:snwx.com",
"domain:soku.com",
"domain:startssl.com",
"domain:store.steampowered.com",
"domain:symcd.com",
"domain:teamviewer.com",
"domain:tmzvps.com",
"domain:trello.com",
"domain:trellocdn.com",
"domain:ttmeiju.com",
"domain:udache.com",
"domain:uxengine.net",
"domain:weather.bjango.com",
"domain:weather.com",
"domain:webqxs.com",
"domain:weico.cc",
"domain:wenku8.net",
"domain:werewolf.53site.com",
"domain:windowsupdate.com",
"domain:wkcdn.com",
"domain:workflowy.com",
"domain:xdrig.com",
"domain:xiaojukeji.com",
"domain:xiaomi.net",
"domain:xiaomicp.com",
"domain:ximalaya.com",
"domain:xitek.com",
"domain:xmcdn.com",
"domain:xslb.net",
"domain:xteko.com",
"domain:yach.me",
"domain:yixia.com",
"domain:yunjiasu-cdn.net",
"domain:zealer.com",
"domain:zgslb.net",
"domain:zimuzu.tv",
"domain:zmz002.com",
"domain:samsungdm.com"
]
},
{
"type": "field",
"port": null,
"inboundTag": null,
"outboundTag": "block",
"ip": null,
"domain": [
"geosite:category-ads-all"
]
},
{
"type": "field",
"port": null,
"inboundTag": null,
"outboundTag": "direct",
"ip": [
"geoip:private"
],
"domain": null
},
{
"type": "field",
"port": null,
"inboundTag": null,
"outboundTag": "direct",
"ip": [
"geoip:cn"
],
"domain": null
},
{
"type": "field",
"port": null,
"inboundTag": null,
"outboundTag": "direct",
"ip": null,
"domain": [
"geosite:cn"
]
}
]
}
}

6.请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

v2rayN客户端日志:
配置成功
[Vmess] heroku02(104***1:443)
启动服务(2020/10/18 星期日 17:20:53)...
V2Ray 4.31.1 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.15.3 windows/amd64)
A unified platform for anti-censorship.
2020/10/18 17:20:54 [Info] v2ray.com/core/common/platform/ctlcmd:
v2ctl> Read config: E:\v2rayN-Core\config.json
2020/10/18 17:20:54 [Warning] v2ray.com/core: V2Ray 4.31.1 started
2020/10/18 17:20:54 127.0.0.1:5055 accepted tcp:127.0.0.1:0 [api]
2020/10/18 17:20:57 tcp:127.0.0.1:5076 accepted tcp:149.154.175.58:80 [proxy]
2020/10/18 17:20:57 tcp:127.0.0.1:5074 accepted tcp:149.154.175.50:443 [proxy]
2020/10/18 17:20:57 tcp:127.0.0.1:5075 accepted tcp:149.154.175.58:443 [proxy]
2020/10/18 17:20:57 tcp:127.0.0.1:5078 accepted tcp:149.154.175.50:80 [proxy]
2020/10/18 17:20:59 tcp:127.0.0.1:5091 accepted tcp:149.154.175.58:80 [proxy]
2020/10/18 17:20:59 tcp:127.0.0.1:5093 accepted tcp:149.154.175.50:80 [proxy]
2020/10/18 17:20:59 tcp:127.0.0.1:5088 accepted tcp:149.154.175.58:443 [proxy]
2020/10/18 17:20:59 tcp:127.0.0.1:5090 accepted tcp:149.154.175.50:443 [proxy]
2020/10/18 17:21:01 tcp:127.0.0.1:5101 accepted tcp:149.154.175.50:443 [proxy]
2020/10/18 17:21:01 tcp:127.0.0.1:5100 accepted tcp:149.154.175.58:443 [proxy]
2020/10/18 17:21:01 tcp:127.0.0.1:5105 accepted tcp:149.154.175.58:80 [proxy]
2020/10/18 17:21:01 tcp:127.0.0.1:5106 accepted tcp:149.154.175.50:80 [proxy]
2020/10/18 17:21:02 tcp:127.0.0.1:5109 accepted tcp:149.154.167.51:443 [proxy]
2020/10/18 17:21:02 tcp:127.0.0.1:5111 accepted tcp:149.154.167.51:80 [proxy]
2020/10/18 17:21:02 tcp:127.0.0.1:5113 accepted tcp:mtalk.google.com:443 [proxy]
2020/10/18 17:21:03 tcp:127.0.0.1:5118 accepted tcp:91.108.56.166:443 [proxy]
2020/10/18 17:21:03 tcp:127.0.0.1:5117 accepted tcp:91.108.56.166:443 [proxy]
2020/10/18 17:21:03 tcp:127.0.0.1:5121 accepted tcp:91.108.56.166:80 [proxy]
2020/10/18 17:21:03 tcp:127.0.0.1:5122 accepted tcp:91.108.56.166:80 [proxy]
2020/10/18 17:21:03 tcp:127.0.0.1:5124 accepted tcp:149.154.167.51:443 [proxy]
2020/10/18 17:21:03 tcp:127.0.0.1:5126 accepted tcp:149.154.167.51:80 [proxy]
2020/10/18 17:21:03 tcp:127.0.0.1:5130 accepted tcp:www.google.com:443 [proxy]
2020/10/18 17:21:03 tcp:127.0.0.1:5133 accepted tcp:www.google.com:443 [proxy]
2020/10/18 17:21:04 tcp:127.0.0.1:5135 accepted tcp:www.google.com:443 [proxy]
2020/10/18 17:21:04 tcp:127.0.0.1:5137 accepted tcp:149.154.167.51:443 [proxy]
2020/10/18 17:21:04 tcp:127.0.0.1:5139 accepted tcp:149.154.167.51:80 [proxy]
2020/10/18 17:21:04 tcp:127.0.0.1:5142 accepted tcp:www.google.com:443 [proxy]
2020/10/18 17:21:05 tcp:127.0.0.1:5144 accepted tcp:www.youtube.com:443 [proxy]
2020/10/18 17:21:06 tcp:127.0.0.1:5148 accepted tcp:149.154.167.51:443 [proxy]
2020/10/18 17:21:06 tcp:127.0.0.1:5151 accepted tcp:149.154.167.51:80 [proxy]
2020/10/18 17:21:06 tcp:127.0.0.1:5153 accepted tcp:fonts.gstatic.com:443 [proxy]
2020/10/18 17:21:06 tcp:127.0.0.1:5155 accepted tcp:api.mousegesturesapi.com:443 [proxy]
2020/10/18 17:21:06 tcp:127.0.0.1:5157 accepted tcp:www.youtube.com:443 [proxy]
2020/10/18 17:21:07 tcp:127.0.0.1:5160 accepted tcp:www.youtube.com:443 [proxy]
2020/10/18 17:21:08 tcp:127.0.0.1:5164 accepted tcp:149.154.167.51:443 [proxy]
2020/10/18 17:21:08 tcp:127.0.0.1:5166 accepted tcp:149.154.167.51:80 [proxy]
2020/10/18 17:21:08 tcp:127.0.0.1:5169 accepted tcp:91.108.56.166:443 [proxy]
2020/10/18 17:21:08 tcp:127.0.0.1:5170 accepted tcp:91.108.56.166:443 [proxy]
2020/10/18 17:21:08 tcp:127.0.0.1:5173 accepted tcp:91.108.56.166:80 [proxy]
2020/10/18 17:21:08 tcp:127.0.0.1:5174 accepted tcp:91.108.56.166:80 [proxy]
2020/10/18 17:21:09 tcp:127.0.0.1:5181 accepted tcp:149.154.167.51:443 [proxy]
2020/10/18 17:21:09 tcp:127.0.0.1:5184 accepted tcp:149.154.167.51:80 [proxy]
2020/10/18 17:21:10 tcp:127.0.0.1:5188 accepted tcp:149.154.175.100:443 [proxy]
2020/10/18 17:21:10 tcp:127.0.0.1:5190 accepted tcp:149.154.175.100:80 [proxy]
2020/10/18 17:21:11 tcp:127.0.0.1:5195 accepted tcp:149.154.175.100:443 [proxy]
2020/10/18 17:21:11 tcp:127.0.0.1:5197 accepted tcp:149.154.175.100:80 [proxy]
2020/10/18 17:21:12 tcp:127.0.0.1:5202 accepted tcp:149.154.175.100:443 [proxy]
2020/10/18 17:21:12 tcp:127.0.0.1:5204 accepted tcp:149.154.175.100:80 [proxy]
2020/10/18 17:21:13 tcp:127.0.0.1:5209 accepted tcp:www.youtube.com:443 [proxy]
2020/10/18 17:21:14 tcp:127.0.0.1:5212 accepted tcp:149.154.175.100:443 [proxy]
2020/10/18 17:21:14 tcp:127.0.0.1:5214 accepted tcp:149.154.175.100:80 [proxy]
2020/10/18 17:21:14 tcp:127.0.0.1:5218 accepted tcp:clients4.google.com:443 [proxy]
2020/10/18 17:21:15 tcp:127.0.0.1:5221 accepted tcp:www.youtube.com:443 [proxy]

7.请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。
vps日志无法获取,因为节点为他人赠与使用。求解

8.其它相关的配置文件(如 Nginx)和相关日志。

9.如果 V2Ray 无法启动,请附上 --test 输出。

10.其他问题补充:
电脑端的其他节点正常使用,就好几个跟这个类似的节点一直无法使用,前不久还可以正常使用。
系统时间精准,系统无其他毛病及缺少什么组件之类的。
用过cloudflare的workers反代加速。就是****.***.dev这种。还用过自选ip。
其他还有什么需要补充的请提出,谢谢了

关于[email protected]

小白问一下这两个v2ray.service和[email protected]有什么区别呢?我现在用的是4.28.2最新版本,v2ray和caddy都是亲自手动安装的,就是在/etc/systemd/system/下放置*.service文件时感觉[email protected]完全用不到啊,在执行指令systemctl daemon-reload 和 systemctl enable v2ray后,并没有提及到[email protected]这个文件,是不是这个文件没什么太大用处或者用不到?

Benchmarking Performance

Hi,

First off, great project and super useful!

I'm currently running a server with v2ray as a transparent proxy. Primarily, I am using it for the useful SNI features and the geo*.dat lists in order to route traffic on my network to different VPN connections.

I was interested in the performance aspects of v2ray and what can possibly be done to improve upon them.

While I'm not sure what the standard methodology for benchmarking a transparent proxy is here's what I did.

  • I start an iperf3 server instance (ie. iperf3 -s) on port 5201.
  • Then, I start a v2ray instance using the freedom outbound, redirecting to iperf on port 5201 (see the config.json below).
  • Finally, I start the iperf3 client tunneled via v2ray (eg. iperf3 -c localhost -p 33800).

Without any encryption or rules I notice a 3x drop in throughput as the results below show.

As I said, I'd just like to get a bit more insight into what are the reasons for this throughput reduction (eg. is memory being copied around a lot and can it be optimized, golang's GC, etc) and what can be done to improve it (eg. possibly writing a Linux kernel module to directly write to the network, etc).

Thanks!

Baseline:

[  5] local 127.0.0.1 port 39558 connected to 127.0.0.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  4.73 GBytes  40.6 Gbits/sec    0   3.06 MBytes       
[  5]   1.00-2.00   sec  4.16 GBytes  35.8 Gbits/sec    4   3.18 MBytes       
[  5]   2.00-3.00   sec  4.37 GBytes  37.5 Gbits/sec   21   3.18 MBytes       
[  5]   3.00-4.00   sec  4.29 GBytes  36.8 Gbits/sec    0   3.18 MBytes       
[  5]   4.00-5.00   sec  4.31 GBytes  37.1 Gbits/sec    0   3.18 MBytes       
[  5]   5.00-6.00   sec  4.15 GBytes  35.6 Gbits/sec    0   3.18 MBytes       
[  5]   6.00-7.00   sec  4.16 GBytes  35.7 Gbits/sec    0   3.18 MBytes       
[  5]   7.00-8.00   sec  4.06 GBytes  34.9 Gbits/sec    0   3.18 MBytes       
[  5]   8.00-9.00   sec  4.24 GBytes  36.4 Gbits/sec    0   3.18 MBytes       
[  5]   9.00-10.00  sec  4.28 GBytes  36.7 Gbits/sec    2   3.18 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  42.8 GBytes  36.7 Gbits/sec   27             sender
[  5]   0.00-10.04  sec  42.8 GBytes  36.6 Gbits/sec                  receiver

V2Ray:

[  5] local 127.0.0.1 port 38152 connected to 127.0.0.1 port 33800
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.01   sec  1.61 GBytes  13.7 Gbits/sec    6   2.69 MBytes       
[  5]   1.01-2.00   sec  1.49 GBytes  12.9 Gbits/sec    0   3.00 MBytes       
[  5]   2.00-3.00   sec  1.62 GBytes  13.9 Gbits/sec    0   3.00 MBytes       
[  5]   3.00-4.00   sec  1.63 GBytes  14.0 Gbits/sec    0   3.12 MBytes       
[  5]   4.00-5.00   sec  1.54 GBytes  13.2 Gbits/sec   28   3.12 MBytes       
[  5]   5.00-6.00   sec  1.57 GBytes  13.5 Gbits/sec    1   3.12 MBytes       
[  5]   6.00-7.00   sec  1.66 GBytes  14.3 Gbits/sec    1   3.12 MBytes       
[  5]   7.00-8.00   sec  1.47 GBytes  12.6 Gbits/sec    8   3.12 MBytes       
[  5]   8.00-9.00   sec  1.60 GBytes  13.7 Gbits/sec    4   3.12 MBytes       
[  5]   9.00-10.00  sec  1.53 GBytes  13.2 Gbits/sec    0   3.12 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  15.7 GBytes  13.5 Gbits/sec   48             sender
[  5]   0.00-10.04  sec  15.7 GBytes  13.4 Gbits/sec                  receiver

config.json

  "inbounds": [
    {
      "port": 33800,
      "protocol": "dokodemo-door",
      "settings": {
        "network": "tcp,udp",
        "followRedirect": true
      },
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "tag": "direct",
      "settings": {
      "redirect": "127.0.0.1:5201"
      },
      "streamSettings": {
        "sockopt": {
          "mark": 255
        }
      }
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "domainStrategy": "AsIs",
      "rules": []
    }
  }
}```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.