personal frp server example
[common]
server_addr = 0.0.0.0 server_port = 7000
The maximum amount of time a dial to server will wait for a connect to complete. Default value is 10 seconds.
dial_server_keepalive specifies the interval between keep-alive probes for an active network connection between frpc and frps.
if you want to connect frps by http proxy or socks5 proxy or ntlm proxy, you can set http_proxy here or in global environment variables
http_proxy = http://user:[email protected]:8080
http_proxy = socks5://user:[email protected]:1080
http_proxy = ntlm://user:[email protected]:2080
log_file = ./frpc.log
log_level = info
log_max_days = 3
disable_log_color = false
authenticate_heartbeats specifies whether to include authentication token in heartbeats sent to frps. By default, this value is false.
authenticate_heartbeats = false
authenticate_new_work_conns specifies whether to include authentication token in new work connections sent to frps. By default, this value is false.
authenticate_new_work_conns = false
token = 12345678
oidc_client_id specifies the client ID to use to get a token in OIDC authentication if AuthenticationMethod == "oidc".
oidc_client_id =
oidc_client_secret specifies the client secret to use to get a token in OIDC authentication if AuthenticationMethod == "oidc".
oidc_client_secret =
oidc_audience specifies the audience of the token in OIDC authentication if AuthenticationMethod == "oidc". By default, this value is "".
oidc_audience =
It will be used to get an OIDC token if AuthenticationMethod == "oidc". By default, this value is "".
oidc_token_endpoint_url =
oidc_additional_audience = https://dev.auth.com/api/v2/
admin_addr = 127.0.0.1 admin_port = 7400 admin_user = admin admin_pwd = admin
pool_count = 5
user = your_name
login_fail_exit = true
protocol = tcp
connect_server_local_ip = 0.0.0.0
tls_enable = true
meta_var1 = 123 meta_var2 = 234
udp_packet_size = 1500
disable_custom_tls_first_byte = false
pprof_enable = false
if user in [common] section is not empty, it will be changed to {user}.{proxy} such as 'your_name.ssh'
[ssh]
type = tcp local_ip = 127.0.0.1 local_port = 22
bandwidth_limit = 1MB
use_encryption = false
use_compression = false
remote_port = 6001
group = test_group
group_key = 123456
health_check_type = tcp
health_check_timeout_s = 3
health_check_max_failed = 3
health_check_interval_s = 10
meta_var1 = 123 meta_var2 = 234
[ssh_random] type = tcp local_ip = 127.0.0.1 local_port = 22
remote_port = 0
[range:tcp_port] type = tcp local_ip = 127.0.0.1 local_port = 6010-6020,6022,6024-6028 remote_port = 6010-6020,6022,6024-6028 use_encryption = false use_compression = false
[dns] type = udp local_ip = 114.114.114.114 local_port = 53 remote_port = 6002 use_encryption = false use_compression = false
[range:udp_port] type = udp local_ip = 127.0.0.1 local_port = 6010-6020 remote_port = 6010-6020 use_encryption = false use_compression = false
Resolve your domain names to [server_addr] so you can use http://web01.yourdomain.com to browse web01 and http://web02.yourdomain.com to browse web02
[web01] type = http local_ip = 127.0.0.1 local_port = 80 use_encryption = false use_compression = true
http_user = admin http_pwd = admin
if domain for frps is frps.com, then you can access [web01] proxy by URL http://web01.frps.com
subdomain = web01 custom_domains = web01.yourdomain.com
locations = /,/pic
host_header_rewrite = example.com
header_X-From-Where = frp health_check_type = http
health_check_url = /status health_check_interval_s = 10 health_check_max_failed = 3 health_check_timeout_s = 3
[web02] type = https local_ip = 127.0.0.1 local_port = 8000 use_encryption = false use_compression = false subdomain = web01 custom_domains = web02.yourdomain.com
proxy_protocol_version = v2
[plugin_unix_domain_socket] type = tcp remote_port = 6003
plugin = unix_domain_socket
plugin_unix_path = /var/run/docker.sock
[plugin_http_proxy] type = tcp remote_port = 6004 plugin = http_proxy plugin_http_user = abc plugin_http_passwd = abc
[plugin_socks5] type = tcp remote_port = 6005 plugin = socks5 plugin_user = abc plugin_passwd = abc
[plugin_static_file] type = tcp remote_port = 6006 plugin = static_file plugin_local_path = /var/www/blog plugin_strip_prefix = static plugin_http_user = abc plugin_http_passwd = abc
[plugin_https2http] type = https custom_domains = test.yourdomain.com plugin = https2http plugin_local_addr = 127.0.0.1:80 plugin_crt_path = ./server.crt plugin_key_path = ./server.key plugin_host_header_rewrite = 127.0.0.1 plugin_header_X-From-Where = frp
[plugin_https2https] type = https custom_domains = test.yourdomain.com plugin = https2https plugin_local_addr = 127.0.0.1:443 plugin_crt_path = ./server.crt plugin_key_path = ./server.key plugin_host_header_rewrite = 127.0.0.1 plugin_header_X-From-Where = frp
[plugin_http2https] type = http custom_domains = test.yourdomain.com plugin = http2https plugin_local_addr = 127.0.0.1:443 plugin_host_header_rewrite = 127.0.0.1 plugin_header_X-From-Where = frp
[secret_tcp]
type = stcp
sk = abcdefg local_ip = 127.0.0.1 local_port = 22 use_encryption = false use_compression = false
[secret_tcp_visitor]
role = visitor type = stcp
server_name = secret_tcp sk = abcdefg
bind_addr = 127.0.0.1 bind_port = 9000 use_encryption = false use_compression = false
[p2p_tcp] type = xtcp sk = abcdefg local_ip = 127.0.0.1 local_port = 22 use_encryption = false use_compression = false
[p2p_tcp_visitor] role = visitor type = xtcp server_name = p2p_tcp sk = abcdefg bind_addr = 127.0.0.1 bind_port = 9001 use_encryption = false use_compression = false
[tcpmuxhttpconnect] type = tcpmux multiplexer = httpconnect local_ip = 127.0.0.1 local_port = 10701 custom_domains = tunnel1