Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否支持内网穿透的配置examples? #54

Closed
Jinnrry opened this issue Apr 7, 2022 · 4 comments
Closed

能否支持内网穿透的配置examples? #54

Jinnrry opened this issue Apr 7, 2022 · 4 comments

Comments

@Jinnrry
Copy link

Jinnrry commented Apr 7, 2022

另外想问问,内网穿透的时候,内网服务器和公网服务器直接的通信是否可以修改协议呢?我公网服务器在国外,最近发现流量受到干扰。

@Jinnrry
Copy link
Author

Jinnrry commented Apr 7, 2022

这是我目前配置,使用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"
      }
    ]
  }
}

@Larvan2
Copy link
Contributor

Larvan2 commented Jun 30, 2022

#62

@yuhan6665
Copy link
Member

@Jinnrry
Copy link
Author

Jinnrry commented Jan 16, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants