Intranet penetration
Others cannot access the files in a certain folder of your home computer through a link, because your home computer belongs to the intranet, and the one that can be accessed through a link belongs to the public network, so you need to use the [internal network]. Network penetration] This is a technical concept to achieve remote access to home computers.
what is frp
frp is a high-performance reverse proxy application focusing on intranet penetration, supporting TCP, UDP, HTTP, HTTPS and other protocols. Intranet services can be exposed to the public network through transit with public network IP nodes in a safe and convenient way.
The whole service process of frp is like this. It is not so much free. In fact, you also need a server to achieve it. If you have a server, it's easy to handle. If you don't have a server, either buy a server or borrow someone else's server to build this frp penetration service.
frp download
frp is free and open source, you can download the corresponding version on GitHub: https://github.com/fatedier/frp/releases
Because I am a Linux server as a server and a Windows system as a client, so I downloaded two versions here, one is for setting up the server frp and the other is for setting up the client.
frp install
Installation documentation (Chinese): https://gofrp.org/docs/setup/
My server uses the pagoda panel, directly created a frp directory under the www/wwwroot/ directory under the [file] root directory of the pagoda panel, and then decompressed frp_0.41.0_linux_386.tar.gz and uploaded these three files to this directory.
These three files are the binary files and configuration files of the server frp.
In this way, the server is already deployed, and then the client is deployed. Because my client is Windows, I just downloaded 2 frp versions. I just deployed the server of the Linux server, and now I am deploying the Windows client. After decompressing frp_0.41.0_windows_386.zip, copy these three files to any directory on your computer. Here I put it in the frp directory of the D drive.
Configure and start frp to achieve http access to intranet services
In the file management panel of the pagoda panel, find the file directory of frp and double-click frps.ini to open the configuration file, as shown in the figure below to configure.
Server configuration
[common]
bind_addr = 0.0.0.0
bind_port = 7000
privilege_token = 12345678
vhost_http_port = 8080
Description: bind_addr is the local ip of the server, bind_port is the port opened by the server locally for frp, privilege_token is a token token used for security verification between the server and the client, vhost_http_port is an http port opened by the server, in principle It uses port 80, but generally some servers will set up port 80 for other websites or services, so 80 should be occupied. Here, 8080 is used instead of port 80.
Client configuration
Open the configuration file frpc.ini of the client frp, I use sublime text3 to open it here, you can also use Notepad or other code editor to open it.
[common]
server_addr = xxx.xx.xx.x
server_port = 7000
privilege_token = 12345678
[httpname]
type = http
local_port = 80
local_ip = 127.0.0.1
custom_domains = www.qq.com
Description: server_addr is the ip address of the server, server_port is the open port set by the server frp, privilege_token is the token set by the server, type is the http service, and local_port is the local service port of the client (the client here is my home computer) , the home computer builds a website and uses phpstudy to open the service locally, so it is port 80, local_ip is the ip address of the client http service, the ip address of the local service is 127.0.0.1, custom_domains is the bound domain name, you You need to resolve this domain name to your server's ip.
The above server and client configuration is complete.
start frp service
Open the [Terminal] of the pagoda panel
Use the cd command to cd to the directory of your frp server and execute the following command to start the frp server.
./frps -c ./frps.ini
After the server is started, start the client. Because my client is windows, I use cmd to start it. Enter cmd in the file directory under the directory of the frp client and press Enter to enter the cmd command line tool.
Enter frpc.exe directly and press Enter to start the client.
access service
When the above configuration is completed, your frp intranet penetration service can be used.
Enter the domain name you just configured and the port number of the frp server's external service in the browser to access the intranet service through http. For example, your domain name is www.qq.com, and the server http port configured at the beginning is 8080, then you need to visit: http://www.qq.com:8080 , pay attention, be sure to open the ports involved in the above on the server , whether it is port 8080 or 7000, it needs to be opened, and the specific opening position is the [Security] of the pagoda panel.
I used phpstudy to build a website on my home computer, so it can be displayed by direct access.
Author: TANKING
Web: www.likeyunba.com
WeChat: sansure2016 (add me to the technology group)
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。