Install Frp client on Mac and use remote desktop
You can install it with Homebrew.
The following section shows the old manual extraction method. Keep reading if you want that approach.
brew install frpc
vi /usr/local/etc/frp/frpc.ini
brew services start frpc
Download the Darwin package from FRP releases and unzip it
- omitted
Copy the executable
sudo mv ~/Downloads/frp_0.34.3_darwin_amd64/frpc /usr/local/bin/
Add the frpc configuration file
- Adjust
server_addr,server_port, andremote_portas needed.
Edit the auto-start configuration
- Commands related to auto-start
sudo su
cat>/etc/frpc.ini<<EOF
[common]
server_addr = blog.margrop.net
server_port = 2345
[VNC-Mac-TEST-CLIENT]
type = tcp
local_port = 5900
remote_port = 3333
[SSH-Mac-TEST-CLIENT]
type = tcp
local_port = 22
remote_port = 3333
EOF
Edit the auto-start plist
sudo vi /Library/LaunchDaemons/frpc.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>frpc</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/frpc</string>
<string>-c</string>
<string>/etc/frpc.ini</string>
</array>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
- Auto-start commands
launchctl load
launchctl unload
launchctl stop
launchctl start