Cloud Studio and FRP Internal Network Penetration#
I saw a group member mention that deploying FRP on Cloud Studio's high-performance GPU basic machine always fails, and they don't know why. Therefore, the author also tried to deploy it once to see if it could be successful.
Preparation Required
- A VPS with a public IP
- A domain name already hosted on CF, pointing to this public IP
Must turn off the small cloud
- Both must be able to download or obtain the FRP installation package
Alright, let's get started.
a. First, execute the download command on your public VPS
curl https://github.com/fatedier/frp/releases/download/v0.61.1/frp_0.61.1_linux_amd64.tar.gz
b. Unzip
tar -zxvf frp_0.61.1_linux_amd64.tar.gz
c. Rename
mv frp_0.61.1_linux_amd64 frp
d. Enter the FRP directory
cd frp
e. Modify the configuration file
The one with 's' is the server, which runs the configuration file on the VPS with a public IP, specifying the HTTP request listening port as 8080
vim frps.toml
The content is as follows:
bindPort = 7000
vhostHTTPPort = 8080
If you need to configure HTTPS proxy, you also need to set vhostHTTPSPort.
More parameters can be referenced here https://github.com/fatedier/frp?tab=readme-ov-file#expose-a-simple-http-file-server
Here it is 5678
f. Run the server
./frps -c frps.toml
Open our Cloud Studio, select GPU basic type, and repeat steps a-d.
At this point, we need to modify the frpc.toml configuration file
The one with 'c' is the client, which is the internal network server we need to penetrate, without a public IP.
Modify the frpc.toml file
vim frpc.toml
The content here is:
serverAddr = "10x.xx.xx.xx"
serverPort = 7890
[[proxies]]
name = "web"
type = "http"
localPort = 81
customDomains = ["cf.xx.xx.xx"]
serverAddr is the IP address of your public VPS, localPort is the port for the local service, for example, I simply started an HTTP service on port 81 using Python, customDomains is your domain hosted on CF, pointing to the public VPS IP. Make sure to turn off the small cloud; otherwise, it will fail.
After modification, run
./frpc -c frpc.toml
For testing, I simply started an HTTP service on Cloud Studio using Python.
The command is: python -m http.server 81
Through the proxy service provided by CS, we can access port 81
https://xxxxxx.ap-shanghai.cloudstudio.work/proxy/81
Access is normal. Next, we will test access through the domain name configured in FRP
http://xxx.xxx.xxx:5678
Attached is a screenshot of Cloudflare
This concludes the tutorial. For specific parameters, see the FRP project documentation.