[GH-ISSUE #1228] Bind 443 as type tcp not work as expected #964

Closed
opened 2026-05-05 12:37:05 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @douo on GitHub (May 1, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1228

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.27.0

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/.../.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/tiou/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build854346325=/tmp/go-build -gno-record-gcc-switches"

Server(No go installed):

Linux VM_16_2_centos 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Configures you used:
frps.ini

[common]
bind_port = 7032
vhost_http_port = 8032

subdomain_host = xxx.xx

dashboard_port = 7500
dashboard_user = xxxx
dashboard_pwd = xxxx

frpc.ini:

[common]
server_addr = *.*.*.*
server_port = 7032


admin_addr = 0.0.0.0
admin_port = 7400
admin_user = xxx
admin_pwd = xxx

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6211

[nginx_ssl]
type = tcp
local_ip = 127.0.0.1
local_port = 433
remote_port = 8211

Steps to reproduce the issue:

  1. start frps & frpc, ssh is fine
  2. run openssl s_client -connect 127.0.0.1:8211 -tls1 on server
  3. run openssl s_client -connect 127.0.0.1:433 -tls1 on client

Describe the results you received:
handshake failed on server:

---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    Krb5 Principal: None
    PSK identity: None
    PSK identity hint: None
    Start Time: 1556714372
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---

client worked:

---
...
No client certificate CA names sent
Peer signing digest: MD5-SHA1
Peer signature type: RSA
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 3280 bytes and written 209 bytes
Verification: OK
---
...

Describe the results you expected:

SSL behavior should be same in tcp level

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

Can you point out what caused this issue (optional)

Originally created by @douo on GitHub (May 1, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1228 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.27.0 **What operating system and processor architecture are you using (`go env`)?** Client: ``` GOARCH="amd64" GOBIN="" GOCACHE="/home/.../.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/tiou/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/go" GOTMPDIR="" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" 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-build854346325=/tmp/go-build -gno-record-gcc-switches" ``` Server(No go installed): ``` Linux VM_16_2_centos 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux ``` **Configures you used:** frps.ini ``` [common] bind_port = 7032 vhost_http_port = 8032 subdomain_host = xxx.xx dashboard_port = 7500 dashboard_user = xxxx dashboard_pwd = xxxx ``` frpc.ini: ``` [common] server_addr = *.*.*.* server_port = 7032 admin_addr = 0.0.0.0 admin_port = 7400 admin_user = xxx admin_pwd = xxx [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6211 [nginx_ssl] type = tcp local_ip = 127.0.0.1 local_port = 433 remote_port = 8211 ``` **Steps to reproduce the issue:** 1. start frps & frpc, ssh is fine 2. run `openssl s_client -connect 127.0.0.1:8211 -tls1` on server 3. run `openssl s_client -connect 127.0.0.1:433 -tls1` on client **Describe the results you received:** handshake failed on server: ``` --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 0 bytes and written 0 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1 Cipher : 0000 Session-ID: Session-ID-ctx: Master-Key: Key-Arg : None Krb5 Principal: None PSK identity: None PSK identity hint: None Start Time: 1556714372 Timeout : 7200 (sec) Verify return code: 0 (ok) --- ``` client worked: ``` --- ... No client certificate CA names sent Peer signing digest: MD5-SHA1 Peer signature type: RSA Server Temp Key: X25519, 253 bits --- SSL handshake has read 3280 bytes and written 209 bytes Verification: OK --- ... ``` **Describe the results you expected:** SSL behavior should be same in tcp level **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
Author
Owner

@zyfdegh commented on GitHub (Jan 2, 2020):

It seems you have a typo in frpc.ini

local_port = 433

Do you mean local_port = 443 ? Please check the port and try again.

<!-- gh-comment-id:570110878 --> @zyfdegh commented on GitHub (Jan 2, 2020): It seems you have a typo in `frpc.ini` ```sh local_port = 433 ``` Do you mean `local_port = 443` ? Please check the port and try again.
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#964
No description provided.