[GH-ISSUE #2045] frp type = tcp add "remote_ip" #1627

Closed
opened 2026-05-05 13:02:26 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @tentree on GitHub (Nov 2, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/2045

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?

0.34.1

What operating system and processor architecture are you using (go env)?

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/mnt/d/code"
GOPRIVATE=""
GOPROXY="https://goproxy.io"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build049600527=/tmp/go-build -gno-record-gcc-switches"

Configures you used:

[common]
server_addr = frpserver.xxx.xxx
server_port = 5200
token = xxxxxx
tls_enable = true

[sshnode1]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 5200
remote_ip = node1.xxx.xxx

[sshnode2]
type = tcp
local_ip = 127.0.0.1
local_port = 33
remote_port = 5200
remote_ip = node2.xxx.xxx

Steps to reproduce the issue:

  1. add unsupport item "remote_ip"

Describe the results you received:
i have some machine, i want give them diff dns and use traefik tcp router(HostSNI) in order to expose only one port.

such as:

      - "traefik.tcp.routers.node1.rule=HostSNI(`node1.xxx.xxx`)"
      - "traefik.tcp.routers.node1.entrypoints=tcp"
      - "traefik.tcp.routers.node1.tls=true"
      - "traefik.tcp.routers.node1.tls.passthrough=true"
      - "traefik.tcp.routers.node1.service=node1server"
      - "traefik.tcp.services.node1server.loadbalancer.server.port=3001"

      - "traefik.tcp.routers.node2.rule=HostSNI(`node2.xxx.xxx`)"
      - "traefik.tcp.routers.node2.entrypoints=tcp"
      - "traefik.tcp.routers.node2.tls=true"
      - "traefik.tcp.routers.node2.tls.passthrough=true"
      - "traefik.tcp.routers.node2.service=node2server"
      - "traefik.tcp.services.node2server.loadbalancer.server.port=3002"
      

but frpc cant assign “remote_ip”. could you add item(defalut: server_addr ) ?

Describe the results you expected:

add remote_ip item
Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)

Originally created by @tentree on GitHub (Nov 2, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/2045 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** ``` 0.34.1 ``` **What operating system and processor architecture are you using (`go env`)?** ``` GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/mnt/d/code" GOPRIVATE="" GOPROXY="https://goproxy.io" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build049600527=/tmp/go-build -gno-record-gcc-switches" ``` **Configures you used:** ``` [common] server_addr = frpserver.xxx.xxx server_port = 5200 token = xxxxxx tls_enable = true [sshnode1] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 5200 remote_ip = node1.xxx.xxx [sshnode2] type = tcp local_ip = 127.0.0.1 local_port = 33 remote_port = 5200 remote_ip = node2.xxx.xxx ``` **Steps to reproduce the issue:** 1. add unsupport item "remote_ip" 2. 3. **Describe the results you received:** i have some machine, i want give them diff dns and use traefik tcp router(HostSNI) in order to expose only one port. such as: ``` - "traefik.tcp.routers.node1.rule=HostSNI(`node1.xxx.xxx`)" - "traefik.tcp.routers.node1.entrypoints=tcp" - "traefik.tcp.routers.node1.tls=true" - "traefik.tcp.routers.node1.tls.passthrough=true" - "traefik.tcp.routers.node1.service=node1server" - "traefik.tcp.services.node1server.loadbalancer.server.port=3001" - "traefik.tcp.routers.node2.rule=HostSNI(`node2.xxx.xxx`)" - "traefik.tcp.routers.node2.entrypoints=tcp" - "traefik.tcp.routers.node2.tls=true" - "traefik.tcp.routers.node2.tls.passthrough=true" - "traefik.tcp.routers.node2.service=node2server" - "traefik.tcp.services.node2server.loadbalancer.server.port=3002" ``` but frpc cant assign “remote_ip”. could you add item(defalut: server_addr ) ? **Describe the results you expected:** add remote_ip item **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
Author
Owner

@fatedier commented on GitHub (Nov 3, 2020):

Try https instead?

<!-- gh-comment-id:720919505 --> @fatedier commented on GitHub (Nov 3, 2020): Try https instead?
Author
Owner

@tentree commented on GitHub (Nov 3, 2020):

Try https instead?

thank for your reply, i am wrong, the ssh cant use sni.

<!-- gh-comment-id:720945125 --> @tentree commented on GitHub (Nov 3, 2020): > Try https instead? thank for your reply, i am wrong, the ssh cant use sni.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1627
No description provided.