Open the App Store on your iPad and download the Code app. Once installed, locate and set up the remote server feature.
To establish a connection, you'll need to create a TCP tunnel pointing to port 22 of your remote server.
2. Set Up Cpolar for Remote Access
2.1 Installing Cpolar
Run the following command to install Cpolar:
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
Alternatively, for faster installation outside China:
curl -sL https://git.io/cpolar | sudo bash
Check the installed version:
cpolar version
Authenticate using your token from the Cpolar dashboard:
cpolar authtoken YOUR_TOKEN_HERE
Test the setup by creating a simple HTTP tunnel:
cpolar http 8080
Exit with Ctrl+C when done.
Add Cpolar as a system service:
sudo systemctl enable cpolar
Start the Cpolar service:
sudo systemctl start cpolar
Verify the service status:
sudo systemctl status cpolar
2.2 Creating a TCP Tunnel
On an Ubuntu machine, open a browser and navigate to localhost:9200 to access the Cpolar web UI. From there, create a new TCP tunnel:
- Tunnel Name: Customizable (avoid duplicates)
- Protocol: TCP
- Local Address: 22
- Domain Type: Random Temporary TCP Port
- Region: China Top
After creation, copy the public address from the active tunnels list.
3. Remote Development on iPad
In the Codde app, configure a new remote SSH connection:
- Protocol: SSH
- Address: The public address generated by Cpolar (e.g.,
6.tcp.cpolar.top) - Port: Public port number (e.g.,
14503) - Username: Server username
- Password: Server password
Once connected, select a folder to set as your workspace. You can now edit files just like in desktop VSCode.
Test synchronization by modifying code on the server and running it on the iPad:
go run main.go
This should output "HELLO WORLD," confirming a successful connection.
4. Configuring a Fixed TCP Address
Random temporary addresses change every 24 hours. To maintain a stable connection, upgrade your Cpolar plan to Professional or higher and reserve a fixed TCP address:
4.1 Reserving a Fixed TCP Address
Log into the Cpolar dashboard, go to the reservation section, and choose:
- Region: China VIP
- Description: A custom note for reference
Click "Reserve" to generate a permanent public address and port combination.
4.2 Applying the Fixed TCP Address
Update your Code app settings with the new reserved address to ensure uninterrupted remote access.