Project Introduction#
A one-click installation and uninstallation script and Docker image for the original frp internal network penetration server frps based on fatedier/frp. Supports installation and deployment in various environments such as Linux servers and Docker.
- GitHub stilleshan/frps
- Docker stilleshan/frps
docker image support for X86 and ARM
Updates#
- 2024-02-25 Updated to a new version, supporting toml configuration files.
- 2021-05-31 Updated domestic images for easier use.
- 2021-05-31 Updated the Linux one-click installation script to support both X86 and ARM.
- 2021-05-29 Updated from version
0.36.2
, the Docker image now supports both X86 and ARM.
Usage#
Since the frps server requires configuration parameters, this script uses the original frps.toml. After installation, please edit the frps.toml to configure ports, passwords, and other related parameters, and restart the service. You can also fork this repository and modify frps.toml yourself, making one-click installation very convenient. In the future, you can also configure frps.toml and adjust the version of frps.
One-click Script (Execute the script first, then modify the frps.toml file.)#
Installation
wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_install.sh && chmod +x frps_linux_install.sh && ./frps_linux_install.sh
# The following is a domestic mirror
wget https://github.ioiox.com/stilleshan/frps/raw/branch/master/frps_linux_install.sh && chmod +x frps_linux_install.sh && ./frps_linux_install.sh
Usage
vi /usr/local/frp/frps.toml
# Modify frps.toml configuration
sudo systemctl restart frps
# Restart the frps service to take effect
Uninstallation
wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_uninstall.sh && chmod +x frps_linux_uninstall.sh && ./frps_linux_uninstall.sh
# The following is a domestic mirror
wget https://github.ioiox.com/stilleshan/frps/raw/branch/master/frps_linux_uninstall.sh && chmod +x frps_linux_uninstall.sh && ./frps_linux_uninstall.sh
Custom One-click Script (Fork this repository first, then modify the frps.toml file before executing the script.)#
- First, fork this repository.
- Configure frps.toml.
- Modify the frps_linux_install.sh script.
- Change the script link.
- Push the repository to GitHub.
Modify frps_linux_install.sh Script#
FRP_VERSION=0.60.0
can be updated to the latest version according to the original project.
REPO=stilleshan/frps
Since it is forked to your own repository, change stilleshan
to your GitHub account ID.
Execute One-click Script#
After changing stilleshan
in the following script link to your GitHub account ID, execute it.
wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_install.sh && chmod +x frps_linux_install.sh && ./frps_linux_install.sh
Uninstallation Script#
The frps_linux_uninstall.sh uninstallation script is a universal script that can be executed directly, or you can modify the link as above before executing.
wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_uninstall.sh && chmod +x frps_linux_uninstall.sh && ./frps_linux_uninstall.sh
frps Related Commands#
sudo systemctl start frps
# Start the service
sudo systemctl enable frps
# Enable auto-start on boot
sudo systemctl status frps
# Check status
sudo systemctl restart frps
# Restart the service
sudo systemctl stop frps
# Stop the service
Docker Deployment#
To avoid issues with the frps.toml file mounting, formatting, or configuration errors causing the container to fail to run properly and restart in a loop, please ensure that frps.toml is configured correctly before executing the start command.
First, git clone this repository and correctly configure the frps.toml file.
git clone https://github.com/stilleshan/frps
# git clone this repository
git clone https://github.ioiox.com/stilleshan/frps
# Domestic mirror
vi /root/frps/frps.toml
# Configure the frps.toml file
Start the container
docker run -d --name=frps --restart=always \
--network host \
-v /root/frps/frps.toml:/frp/frps.toml \
stilleshan/frps
The above command's -v mounted directory is based on the example of git cloning this repository; you can also manually create the frps.toml file in any location and modify the mount path in the command.
After modifying the frps.toml configuration while the service is running, you need to restart the frps service.
vi /root/frps/frps.toml
# Modify frps.toml configuration
docker restart frps
# Restart the frps container to take effect
About Configuration
==frps.toml==
bindAddr = "0.0.0.0"
bindPort = 7000
#kcpBindPort = 7000
quicBindPort = 7000
webServer.addr = "0.0.0.0"
webServer.port = 7500
webServer.user = "changeme"
webServer.password = "changeme"
log.to = "./frps.log"
log.level = "info"
log.maxDays = 3
log.disablePrintColor = false
auth.method = "token"
auth.token = "changeme"
allowPorts = [
{ start = 443, end = 5000 }
==frpc.toml==
serverAddr = "changeme"
serverPort = 7000
auth.method = "token"
auth.token = "changeme"
[[proxies]]
name = "FD"
type = "tcp"
localIP = "192.168.100.1"
localPort = 443
remotePort = 443
Use systemctl commands to control frps#
sudo systemctl start frps
# Start frps
sudo systemctl enable frps
# Server auto-start frps on boot
sudo systemctl status frps
# Check status
sudo systemctl restart frps
# Restart frps
sudo systemctl stop frps
# Stop frps
This article is synchronized and updated to xLog by Mix Space. The original link is https://taikula.cool/posts/tutorial/frp-fu-wu-da-jian