How to Use frp

Foreword:

Project address: https://github.com/fatedier/frp

0. Introduction

frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the Internet.

frps runs on the server.
frpc runs on the client.

1. Server(Linux)

1.1 Download

1
wget https://github.com/fatedier/frp/releases/download/v0.47.0/frp_0.47.0_linux_amd64.tar.gz

or

1
Invoke-WebRequest -Uri "https://github.com/fatedier/frp/releases/download/v0.59.0/frp_0.59.0_linux_amd64.tar.gz" -OutFile "frp_0.59.0_linux_amd64.tar.gz"

1.2 Decompression

1
2
3
tar -zxvf frp_0.47.0_linux_amd64.tar.gz
cd frp_0.47.0_linux_amd64
rm -rf frpc*

1.3 Configuration

1
vi frps.ini
1
2
3
4
5
6
7
# frps.ini
[common]
bind_port = your_bind_port
dashboard_port = your_dashboard_port
dashboard_user = your_dashboard_user
dashboard_pwd = your_dashboard_pwd
token = your_token

1.4 Run

1
nohup ./frps -c frps.ini > frp.log 2>&1 &

2. Client(Windows)

2.1 Download

https://github.com/fatedier/frp/releases/download/v0.47.0/frp_0.47.0_windows_amd64.zip

or

1
Invoke-WebRequest -Uri "https://github.com/fatedier/frp/releases/download/v0.59.0/frp_0.59.0_windows_amd64.zip" -OutFile "frp_0.59.0_windows_amd64.zip"

2.2 Decompression

Skip Description

2.3 Configuration

1
2
3
4
5
6
7
8
9
10
11
# frpc.ini
[common]
server_addr = your_server_addr
server_port = your_server_port
token = your_token

[ssh]
type = tcp
local_ip = your_local_ip
local_port = your_loacal_port
remote_port = your_remote_port

2.4 Run

1
frpc -c frpc.ini

Common problem

Proxy Error

1
2
3
2022/08/31 22:33:30 [E] [service.go:254] fail to parse proxy url
2022/08/31 22:33:30 [W] [service.go:128] login to server failed: parse "127.0.0.1:10809": first path segment in URL cannot contain colon
parse "127.0.0.1:10809": first path segment in URL cannot contain colon

Solution: Remove proxy settings

1
set http_proxy=

How to Use frp
https://www.hardyhu.cn/2022/08/31/How-to-Use-frp/
Author
John Doe
Posted on
August 31, 2022
Licensed under