SagerNet / SagerNet/sing-box

Suggestion: Add FRP client support

Open
#3,150 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
38.2k
Forks
4.6k
Avg merge
19d 15h
Merged PRs (30d)
1

Description

FRP is a robust reverse tunnel program that I have used for many years on my system. It includes a P2P method called XTCP, which can establish a reverse tunnel even behind NAT. In the context of the GFW, inbound requests are permitted, so a reverse tunnel can help bypass GFW restrictions. If possible, please add integration of FRP to sing-box.

I tested this on my home internet in Iran, and it works great, but it is difficult to set up separately.

https://github.com/fatedier/frp

example :
  "outbounds": [
    {
      "tag": "vmess-out",
      "type": "vmess",
      "server": "::1",
      "server_port": 8080,
      "uuid": "xxxxxx",
      "frpc": {
        "enable": true,
        "serverAddr": "x.x.x.x",
        "serverPort": 8443,
        "auth": {
          "method": "token",
          "token": "yyyyyy"
        },
        "transport": {
          "protocol": "wss",
          "tcpMux": true,
          "poolCount": 5,
          "tls": {
            "enable": true,
            "certFile": "cert.crt",
            "keyFile": "key.pem",
            "trustedCaFile": "ca.crt",
            "serverName": "test.com"
          }
        },
        "visitors": [
          {
            "name": "vmess-reverse-p2p",
            "type": "xtcp",
            "serverName": "vmess-p2p",
            "secretKey": "zzzzzz",
            "bindAddr": "::1",
            "bindPort": 8080,
            "keepTunnelOpen": true
          }
        ]
      }
    }
  ]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No sing-box file, test, or entry point is named. Start by reviewing the linked FRP project and its XTCP client behavior, then determine how the proposed outbound configuration maps to sing-box; done would mean documented, working FRP integration with the demonstrated reverse-tunnel options.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.