Git Product home page Git Product logo

Comments (4)

Jinnrry avatar Jinnrry commented on May 19, 2024

这是我目前配置,使用Nignx反代xray,客户端使用websock协议连接xray,如果是192.168网端的流量转发到内网服务器。这样连上xray既能科学上网,又能内网穿透。

目前科学上网非常稳定,但是内网穿透经常断连,尝试把内网服务器和公网服务器直接的连接协议也改成websocket,但是始终不成功。

{
  "reverse": {
    "portals": [
      {
        "tag": "portal",
        "domain": "xxxx.com"
      }
    ]
  },
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ],
  "inbounds": [
    {
      "tag": "nas_web",
      "port": xxxx,
      "protocol": "dokodemo-door",
      "settings": {
        "address": "0.0.0.0",
        "port": xxxx,
        "network": "tcp"
      }
    },
    {
      "tag": "proxy",
      "port": xxxx,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "xxxxxxxxxx",
            "alterId": 0
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path": "/xxxx/"
        }
      }
    },
    {
      "tag": "tunnel",
      "port": xxxxx,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "xxxxxx"
          }
        ]
      }
    }
  ],
  "routing": {
    "rules": [
      {
        "type": "field",
        "inboundTag": [
          "nas_web"
        ],
        "outboundTag": "portal"
      },
      {
        "ip": [
          "192.168.0.0/16"
        ],
        "type": "field",
        "inboundTag": [
          "proxy"
        ],
        "outboundTag": "portal"
      },
      {
        "type": "field",
        "inboundTag": [
          "tunnel"
        ],
        "domain": [
          "xxxxx.com"
        ],
        "outboundTag": "portal"
      }
    ]
  }
}

from xray-examples.

Larvan2 avatar Larvan2 commented on May 19, 2024

#62

from xray-examples.

yuhan6665 avatar yuhan6665 commented on May 19, 2024

https://github.com/XTLS/Xray-examples/tree/main/ReverseProxy/VLESS-TCP-XTLS-WS close as solved

from xray-examples.

Jinnrry avatar Jinnrry commented on May 19, 2024

请问一下,这样通过fallback回落到ws端口上,但是我看ws那里的加密设置是"security": "none",那这样内网穿透流量是不是就相当于裸奔了?这样不会有安全问题吗

from xray-examples.

Related Issues (20)

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.