Server configuration template
[common]
bind_addr = 0.0.0.0
bind_port = xxxx
dashboard_port = xxxx
dashboard_user = xxxx
dashboard_pwd = xxxxxx
token = xxxxxx
max_pool_count = 50
Client configuration template
[common]
server_addr = xx.xx.xx.xx
server_port = xxx
token = xxxxxx
[chp]
type = tcp
local_ip = 127.0.0.1
local_port = xxxx
remote_port = xxxx
Window Remote Desktop Configuration Template
[common]
server_addr = xx.xx.xx.xx
server_port = xxxx
token = xxxxx
[chp]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = xxxx
Install the server
- Server environment: ubuntu server
- One-click installation script address
- However, his configuration is http, which is not suitable for me. You can directly modify the content of the frps.ini configuration file under /usr/local/frp/ to the above template code after installation, and then according to your needs to modify
frps start
(Start frp server)- Open the corresponding port on the server console (the ports that need to be opened here are: 5443, 6443, 4567)
Start the service in the background, refer to the systemctl command
Install the client
- Download client address
frpc.exe -c frpc.ini
(Remember to modify the configuration file to the above template)
Open http service locally
- The python code I use here is opened with the help of the FastApi framework
- The specific code is as follows
import uvicorn
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {
"message": "Hello World"}
if __name__ == '__main__':
uvicorn.run(app, host='127.0.0.1', port=4567)
- FastApi specific use reference address 1
remote access
- access
http://xx.xx.xx.xx:4567/
- Normally it will print
Hello World