LinuxCommandLibrary

frpc

Expose local services through a remote server

TLDR

Start the service, using the default configuration file (assumed to be frps.ini in the current directory)

$ frpc
copy

Start the service, using the newer TOML configuration file
$ frpc [[-c|--config]] [path/to/frps.toml]
copy

Start the service, using a specific configuration file
$ frpc [[-c|--config]] [path/to/file]
copy

Check if the configuration file is valid
$ frpc verify [[-c|--config]] [path/to/file]
copy

Print autocompletion setup script for Bash, fish, PowerShell, or Zsh
$ frpc completion [bash|fish|powershell|zsh]
copy

Display version
$ frpc [[-v|--version]]
copy

SYNOPSIS

frpc [OPTIONS]

PARAMETERS

-c, --config_file string
    Path to config file (default: frpc.ini)

-a, --admin_addr string
    Admin server bind address (default: 0.0.0.0)

--admin_port int
    Admin server port (default: 7400)

--admin_token string
    Admin server token for authentication

--admin_type string
    Admin type: http, https, tcp, tcp4, tcp6 (default: http)

-l, --log_level string
    Log level: trace, debug, info, warn, error (default: info)

--log_file string
    Log file path; defaults to stdout

--log_max_days int
    Log rotation days (0=no rotation, max 365)

-L, --log_prefix string
    Log message prefix

--disable_log_color
    Disable colored log output

--heartbeat_interval int
    Heartbeat interval in seconds (default: 30)

--heartbeat_timeout int
    Heartbeat timeout in seconds (default: 90)

--token string
    Authentication token for server

--user string
    Username for authentication

--password string
    Password for authentication

--start string
    Comma-separated proxies to start

--stop string
    Comma-separated proxies to stop

--version
    Show version information

-h, --help
    Show help

DESCRIPTION

frpc is the client component of frp (Fast Reverse Proxy), an open-source tool for exposing local services behind NAT or firewalls to the internet via secure tunnels.

It connects to an frps server, creating reverse proxies for TCP, UDP, HTTP, HTTPS, STCP, XTCP, and other protocols. Common use cases include remote desktop access, web server exposure, SSH tunneling, and game server hosting without port forwarding.

Configuration is primarily via an INI file (frpc.ini), specifying server details, proxies, and authentication. CLI options override config. Supports token auth, TLS, heartbeats for connection health, admin UI, and logging. High performance with multiplexing and compression.

Ideal for developers needing quick public access to localhost or sysadmins in restricted networks.

CAVEATS

Requires matching frps server; config file mandatory for proxies; UDP limited by MTU; TLS options for secure connections only if server supports.

CONFIG EXAMPLE

[common]
server_addr = 127.0.0.1
server_port = 7000
token = yourtoken

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

PROXY TYPES

tcp, udp, http, https, stcp, xtcp, tcp_mux; see frpc.toml or INI docs for details.

HISTORY

Developed by fatedier since 2016; v0.1.0 released Jan 2016. Active on GitHub with 80k+ stars; supports Go 1.18+, regular updates for protocols and security.

SEE ALSO

frps(1), ssh(1), socat(1), ngrok(1)

Copied to clipboard