fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
85.6k stars 13.26k forks source link

The bind_port parameter in the toml configuration file is ignored #3676

Closed alegz81 closed 1 year ago

alegz81 commented 1 year ago

Bug Description

frps ignores the bind_port parameter in the configuration file. The value 7000 is used If you don't use the configuration file and run with the frps -p 700, then everything works correctly. Also if it works fine use the file ini format

frpc Version

0.52.1

frps Version

0.52.1

System Architecture

linux/amd64 Ubuntu server 22.04 x64

Configurations

bind_addr = "0.0.0.0" bind_port = 700

kcpBindPort = 700 quicBindPort = 701

transport.maxPoolCount = 20

webServer.addr = "x.x.x.x" webServer.port = 7500 webServer.user = "xxxx" webServer.password = "xxxxxx" webServer.pprofEnable = false enablePrometheus = false

log.to = "console" log.level = "info" log.maxDays = 3 log.disablePrintColor = false

auth.method = "token" auth.token = "xxxxxxxxxxxx"

allowPorts = [ { start = 500, end = 550 } ]

maxPortsPerClient = 0

Logs

[root.go:102] frps uses config file: frps.toml [I] [service.go:200] frps tcp listen on 0.0.0.0:7000 [I] [service.go:210] frps kcp listen on udp 0.0.0.0:700 [I] [service.go:226] frps quic listen on quic 0.0.0.0:701 [I] [service.go:312] Dashboard listen on x.x.x.x:7500 [I] [root.go:111] frps started successfully

Steps to reproduce

  1. ...

Affected area

duandaxei commented 1 year ago

bind_addr => bindAddr bind_port => bindPort

alegz81 commented 1 year ago

My mistake. Didn't read the documentation carefully.