Top Menu

测试V2Ray中转SSR

V2Ray默认不支持SSR,但是由于V2Ray可以作为一个通用中间代理,所以其实是可以实现转发SSR流量的功能。

在V2Ray服务端设置出站连接目标为SSR监听端口

在本地V2Ray客户端设置VMess协议连接至节点,并在SSR客户端设置Remote Proxy为本地V2Ray监听地址

设置完成之后,本地SSR监听端口接受到请求之后,不会直接向服务器发送,而是转发给本地V2Ray服务,由V2Ray使用VMess协议包装后再次发送给V2Ray服务器,V2Ray服务器接受到内容后,解包后再次发送给SSR服务端,SSR服务端收到请求后进行执行,返回结果给V2Ray服务端,由V2Ray服务端加密后返回给V2Ray客户端,V2Ray客户端收到内容后解密并转发给SSR客户端,SSR客户端收到内容后反馈给用户

测试结果:能够正常进行SSR用户认证,并且正常返回数据。

问题:由于经历了两次打包和转发,延迟非常严重,基本不能使用。

改进

后来想了想,其实根本没有这么麻烦,根本不需要指定端口,只需要设定一个开放协议就可以

测试结果:延迟比之前指定端口的明显要好,速度感觉跟SSR直连差不多。

问题:可以跳过SSR认证直接使用V2Ray

实际测试,不转发SSR直接使用VMess协议的时候,连接速度会受限,而使用VMess转发SSR,则没有问题

使用fast.com分别对V2Ray、SSR over V2Ray、SSR进行测试的流量曲线对比

可以看到SSR的峰值来的快,而SSR over V2Ray则峰值较小延迟较大且还在消耗额外的流量,V2Ray则延迟太大在前期都没有数据反馈,峰值太靠后。

测试服务器参数(SJO节点)

 

22 comments

  • Hello, guest
  • vmess://eyJob3N0IjoianVzb24ucmVkZ28udG9wIiwicGF0aCI6Ii9jdGxwb3VsciIsInRscyI6IiIsInZlcmlmeV9jZXJ0Ijp0cnVlLCJhZGQiOiJqdXNvbi5yZWRnby50b3AiLCJwb3J0Ijo4ODgwLCJhaWQiOjAsIm5ldCI6IndzIiwiaGVhZGVyVHlwZSI6Im5vbmUiLCJzZXJ2aWNlbmFtZSI6IiIsImVuYWJsZV94dGxzIjoiIiwidnR5cGUiOiJ2bWVzczovLyIsInNuaSI6Imp1c29uLnJlZGdvLnRvcCIsInYiOiIyIiwidHlwZSI6InZtZXNzIiwicHMiOiJbZGJ0b3AudG9wXSDkv4TnvZfmlq8gMS0wMSIsInJlbWFyayI6IltkYnRvcC50b3BdIOS/hOe9l+aWryAxLTAxIiwiaWQiOiI3MzlmNDc3ZC01N2FjLTM3MTMtODA5Ny1hNzQ2ZTI0MjNhODkiLCJjbGFzcyI6MX0=
  • ss://YWVzLTI1Ni1nY206ZmFCQW9ENTRrODdVSkc3QDE5OC41Ny4yNy4yNDE6MjM3Ng==#itlao5.com+-+%E5%8C%97%E7%BE%8E%E5%9C%B0%E5%8C%BA++37 ss://YWVzLTI1Ni1nY206Rm9PaUdsa0FBOXlQRUdQQDE2Ny44OC42My4xMTk6NzMwNg==#itlao5.com+-+%E7%91%9E%E5%85%B8++40 ss://YWVzLTI1Ni1nY206UENubkg2U1FTbmZvUzI3QDE5My4xMTguNjAuMTY1OjgwOTE=#itlao5.com+-+%E8%8B%B1%E5%9B%BD++46 ss://YWVzLTI1Ni1nY206bjh3NFN0bmJWRDlkbVhZbjRBanQ4N0VBQDc5LjExMC41NC4xMTc6MzE1NzI=#itlao5.com+-+%E7%BD%97%E9%A9%AC%E5%B0%BC%E4%BA%9A++48 ss://YWVzLTI1Ni1nY206Rm9PaUdsa0FBOXlQRUdQQDE5OC41Ny4yNy4yMjU6NzMwNw==#itlao5.com++73 ss://YWVzLTI1Ni1nY206RmFURzR6QUxacnU3Mmd4amdTSFE3SmRoQDgyLjEwMi4yNi45Mzo0MjE4NQ==#itlao5.com++78
  • vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIuS4reWbvV9UR0Bub2Rlc2hhcmluZ182IiwNCiAgImFkZCI6ICJpcGxjMDEuZG5zMjMzMy54eXoiLA0KICAicG9ydCI6ICIzMDgzIiwNCiAgImlkIjogIjJiMTkyMTYzLTNiNzItM2U1OC1iYTEwLTZiZmZiNjllZGQ5MyIsDQogICJhaWQiOiAiMCIsDQogICJzY3kiOiAiYXV0byIsDQogICJuZXQiOiAidGNwIiwNCiAgInR5cGUiOiAibm9uZSIsDQogICJob3N0IjogIiIsDQogICJwYXRoIjogIiIsDQogICJ0bHMiOiAiIiwNCiAgInNuaSI6ICIiLA0KICAiYWxwbiI6ICIiDQp9
  • ssr://aGswMy1zcjUuZW50cnkuaWt1dXUuY2FzYTo4MDgyOmF1dGhfYWVzMTI4X21kNTpjaGFjaGEyMC1pZXRmOnRsczEuMl90aWNrZXRfYXV0aDphVXQxZFhWV1VFNC8_b2Jmc3BhcmFtPVlXSXdZVFl4TURFM01UQXViV2xqY205emIyWjBMbU52YlEmcHJvdG9wYXJhbT1NVEF4TnpFd09tSnhiemR3ZUEmcmVtYXJrcz1WalV0NUxxczVyaXZNeTFUVTFJJmdyb3VwPWFVdDFkWFVnVmxCTw
  • https://api.dler.io/sub?target=ssr&url=vmess%3A%2F%2FYXV0bzpiMDdiMTljMS05ZWU5LTM3OTYtODY5MC1jYjA5Zjk2NDZhZTBAemZkLm91dDAxLm5vZGVzZXJ2ZXIudG9wOjE2MTE5%3Fremarks%3DLV1%2520%25E6%2597%25A5%25E6%259C%25AC%252001%2520NF%26obfs%3Dnone%26alterId%3D0&insert=false&config=https%3A%2F%2Fcdn.staticaly.com%2Fgh%2Flhl77%2Fsub-ini%2Fmain%2FClashNet_FusionX.ini
  • vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIvCfh6/wn4e1IFJlbGF5X/Cfh6jwn4ezQ04iLA0KICAiYWRkIjogImpwMS5iYWljYWlqcy5zcGFjZSIsDQogICJwb3J0IjogIjMwNDExIiwNCiAgImlkIjogIjIxOGIxNzZhLWVjNzAtMzYyZS1iOGI3LTlhYzZhYTdmYTBkMyIsDQogICJhaWQiOiAiMCIsDQogICJuZXQiOiAid3MiLA0KICAidHlwZSI6ICJub25lIiwNCiAgImhvc3QiOiAianAxLmJhaWNhaWpzLnNwYWNlIiwNCiAgInBhdGgiOiAiL3dzIiwNCiAgInRscyI6ICIiDQp9
  • vmess://eyJob3N0I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iwNCiAgInBzIjogIkBTU1JTVUItVjMt5LuY6LS55o6o6I2QOnN1by55dC9zc3JzdWIiLA0KICAiYWRkIjogIjE5NC44Ny43MC4yNTIiLA0KICAicG9ydCI6ICIzMDk4MiIsDQogICJpZCI6ICJjM2U0ZDhlYS04NDZmLTRmMzktYjMzOC0wMWE5ODc3MjE4ZTUiLA0KICAiYWlkIjogIjAiLA0KICAic2N5IjogImF1dG8iLA0KICAibmV0IjogInRjcCIsDQogICJ0eXBlIjogIm5vbmUiLA0KICAiaG9zdCI6ICIxOTQuODcuNzAuMjUyIiwNCiAgInBhdGgiOiAiIiwNCiAgInRscyI6ICIiLA0KICAic25pIjogIiINCn0= vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIkBTU1JTVUItVjQt5LuY6LS55o6o6I2QOnN1by55dC9zc3JzdWIiLA0KICAiYWRkIjogIjIzLjIyNS41Ny4yMDMiLA0KICAicG9ydCI6ICI0NDMiLA0KICAiaWQiOiAiODExNzgyZDktNmNkYi00NWRkLTk0NDgtMWVjNGM0N2FkNTY0IiwNCiAgImFpZCI6ICI2NCIsDQogICJzY3kiOiAiYXV0byIsDQogICJuZXQiOiAid3MiLA0KICAidHlwZSI6ICJub25lIiwNCiAgImhvc3QiOiAid3d3LjM0NDI4Mzk0Lnh5eiIsDQogICJwYXRoIjogIi9wYXRoLzMxMDkxMDIxMTkxNiIsDQogICJ0bHMiOiAidGxzIiwNCiAgInNuaSI6ICIiDQp9 vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIkBTU1JTVUItVjUt5LuY6LS55o6o6I2QOnN1by55dC9zc3JzdWIiLA0KICAiYWRkIjogIjIzLjIyNC44LjgyIiwNCiAgInBvcnQiOiAiNDQzIiwNCiAgImlkIjogIjc0ZTRjMzM2LWFhYTMtNGM0MS05YTBkLWJlYTk0ZTcxODMzYiIsDQogICJhaWQiOiAiNjQiLA0KICAic2N5IjogImF1dG8iLA0KICAibmV0IjogIndzIiwNCiAgInR5cGUiOiAibm9uZSIsDQogICJob3N0IjogInd3dy43ODY1MTMyMi54eXoiLA0KICAicGF0aCI6ICIvcGF0aC8zMTA5MTAyMTE5MTYiLA0KICAidGxzIjogInRscyIsDQogICJzbmkiOiAiIg0KfQ== vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIkBTU1JTVUItVjYt5LuY6LS55o6o6I2QOnN1by55dC9zc3JzdWIiLA0KICAiYWRkIjogIjEzOS4yMjYuNTAuMzIiLA0KICAicG9ydCI6ICIxMDAwMyIsDQogICJpZCI6ICIyYjE2MmY1Ny1mNDVmLTQ2ZDAtYTRkMC0wODVmYzJjOTcyMWEiLA0KICAiYWlkIjogIjEiLA0KICAic2N5IjogImF1dG8iLA0KICAibmV0IjogInRjcCIsDQogICJ0eXBlIjogIm5vbmUiLA0KICAiaG9zdCI6ICIxMzkuMjI2LjUwLjMyIiwNCiAgInBhdGgiOiAiIiwNCiAgInRscyI6ICIiLA0KICAic25pIjogIiINCn0= vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIkBTU1JTVUItVjct5LuY6LS55o6o6I2QOnN1by55dC9zc3JzdWIiLA0KICAiYWRkIjogIjIzLjIyNC42OS4zIiwNCiAgInBvcnQiOiAiNDQzIiwNCiAgImlkIjogIjUzOGQzYjI4LWYzMzUtNGEwYS1iZGE4LWI1MDY1ZmIxYmZiNyIsDQogICJhaWQiOiAiNjQiLA0KICAic2N5IjogImF1dG8iLA0KICAibmV0IjogIndzIiwNCiAgInR5cGUiOiAibm9uZSIsDQogICJob3N0IjogInd3dy4zOTkzMDkzNS54eXoiLA0KICAicGF0aCI6ICIvcGF0aC8zMTA5MTAyMTE5MTYiLA0KICAidGxzIjogInRscyIsDQogICJzbmkiOiAiIg0KfQ== vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIkBTU1JTVUItVjgt5LuY6LS55o6o6I2QOnN1by55dC9zc3JzdWIiLA0KICAiYWRkIjogIjIzLjIyNS4xNjUuMjQyIiwNCiAgInBvcnQi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CI6ICIiLA0KICAidGxzIjogIiIsDQogICJzbmkiOiAiIg0KfQ== vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIkBTU1JTVUItVjExLeS7mOi0ueaOqOiNkDpzdW8ueXQvc3Nyc3ViIiwNCiAgImFkZCI6ICIyMy4yMjQuMzEuMjEwIiwNCiAgInBvcnQiOiAiNDQzIiwNCiAgImlkIjogIjRhYTUwZWUxLTFhM2MtNGFiNS04ZjRhLTk5OGY4Y2NlZG
  • vmess://eyJhZGQiOiIxMzUud2dvbmcueHl6IiwiYWlkIjoiMiIsImhvc3QiOiIiLCJpZCI6ImNjZTc0Y2QxLWU4NTItM2M0OS04YTI2LTI3YjlkOTE0MGZkOCIsIm5ldCI6InRjcCIsInBhdGgiOiIiLCJwb3J0IjoiNTIzMzUiLCJwcyI6Ilt2aXAxXe+4sVYycmF577ix4pGr5Y+w5rm+SGluZXTljp/nlJ/oioLngrkgNjAwTe+9nMOXMeWAjeeOh++9nOmZkOmAnzEwME0iLCJzbmkiOiIiLCJ0bHMiOiIiLCJ0eXBlIjoibm9uZSIsInYiOiIyIn0=
  • 感谢分享,只是有点没看懂,不知道能不能实现本地->v2(服务器1)->ssr(服务器1) -> ssr(服务器2)。因为很多机场都只提供ssr
    • author
      本地->v2(服务器1)->ssr(服务器1)其实就是文章里实现的功能,而本地->ssr(服务器1) -> ssr(服务器2)只需要使用SSR本身的中转功能在配置文件里增加设置就可以实现,理论上这样的配置是可以实现的
      • 如果用第二种方法的话outbound那里不加tags怎么实现用户分流呢?而且直接一个freedom怎么知道本地ssr地址?我试了下第一种似乎不可用,可能python版的ssr还需要另外设置“允许局域网连接”什么的。。另外详细v2和ssr配置文件可以让我参考下吗?谢谢
      • author
        python版SSR默认确实会禁止访问127.0.0.1(https://blog.minirplus.com/14035/),但是仅限于直接访问本地,对于通过v2ray访问本地的SSR接口没有限制,freedom不设置redirect的话其实可以说是绕过了SSR,除非手动指定SSR节点为当前服务器,否则直接可以绕过,文章里的配置是修改的其他都和官方默认的一样,服务器端用的是server.py

Powered by WordPress. Designed by WooThemes