2023 The frp Authors 保留所有权利
中文|English
HTTP type agents are very suitable for integrating the web of internal networks Services are provided to external users through custom domain names. Compared to TCP type Agent, HTTP Agents not only reuse ports, but also provide many functions based on the HTTP protocol.
HTTPS is similar to this, but it should be noted that the HTTPS Agent for frp The local service needs to be an HTTPS service, and the FRPS end will not perform TLS termination. It can also be combined with Implementing HTTPS to convert local HTTP services The agreement was exposed.
Configuration frps.toml
Add the following to the frps.toml file to specify HTTP. The listening port for the request is 8080:
bindPort = 7000
vhostHTTPPort = 8080
If you need Configuration HTTPS Agent, you also need to
set the
vhostHTTPSPort
。
Configuration frpc.toml
Add the following to the frpc.toml file to ensure that the correct server IP is set. Address, local Web service listening port and custom domain name:
serverAddr = "x.x.x.x"
serverPort = 7000
[[proxies]]
name = "web"
type = "http"
localPort = 80
customDomains = ["www.yourdomain.com"]
[[proxies]]
name = "web2"
type = "http"
localPort = 8080
customDomains = ["www.yourdomain2.com"]
Start FRPS and FRPC
Domain name resolution
Connectwww.yourdomain. com
and Domain name A
forwww.yourdomain2. com
Record the IP address resolved to the server
x.x.x.x
. If the server already has a
corresponding domain name, you can also add CNAME Record
resolution to the original domain name. Additionally, by
modifying the Host of HTTP requests Fields can also
achieve the same effect.
Accessing through a browser
Use browser access
http://www.yourdomain.com:8080
You can access the 80 port service on the internal network
machine to access
http://www.yourdomain2.com:8080
You can access the 8080 port service on the internal
network machine.