ڈیولپرز کے لیے Terminal Proxy ورک فلو
FreeGuard CLI آپ کے terminal کو ایک محفوظ development environment میں تبدیل کرتا ہے، کیونکہ یہ traffic کو encrypted VPN tunnels کے ذریعے route کرتا ہے۔ چاہے آپ restricted networks سے repositories clone کر رہے ہوں، regions کے درمیان APIs debug کر رہے ہوں، یا secure channels کے ذریعے containers deploy کر رہے ہوں، CLI ان tools کے ساتھ integrate ہو جاتا ہے جو آپ پہلے سے استعمال کرتے ہیں — git, ssh, curl, docker، اور مزید۔
ڈیولپرز کو Terminal Proxy کی ضرورت کیوں ہے
بہت سے development tasks میں network access شامل ہوتا ہے جو VPN protection سے فائدہ اٹھاتا ہے:
- coffee shops یا airports سے internal APIs تک رسائی
- development کے دوران geo-restricted services کی testing
- ایسے networks پر code push کرنا جو git traffic کو throttle یا inspect کرتے ہیں
- restrictive firewalls کے ذریعے remote servers سے connect کرنا
- CI/CD credentials کو transit کے دوران encrypted رکھنا
FreeGuard CLI یہ سب کچھ آپ کے terminal سے باہر نکلے بغیر سنبھالتا ہے۔
VPN کے ذریعے Git
مسئلہ
Corporate networks، public Wi-Fi، اور کچھ ISPs git operations کو throttle یا block کرتے ہیں۔ SSH-based git connections deep packet inspection کے ذریعے flag ہو سکتی ہیں۔ HTTPS clones transparent proxies کے ذریعے intercept ہو سکتے ہیں۔
حل
اپنی git operations سے پہلے FreeGuard سے connect کریں:
freeguard connect --server us-east
git clone [email protected]:your-org/private-repo.git
git fetch --all
git push origin feature-branch
freeguard disconnect
مزید automated طریقے کے لیے، اسے ایک script میں wrap کریں:
#!/bin/bash
freeguard connect --server us-east --json | jq -r '.status'
trap "freeguard disconnect" EXIT
git pull origin main
npm run build
git push origin main
trap اس بات کو یقینی بناتا ہے کہ اگر script درمیان میں fail بھی ہو جائے تو VPN disconnect ہو جائے۔
Proxy-Aware Git
FreeGuard CLI ایک local SOCKS5 یا HTTP proxy بھی expose کر سکتا ہے۔ git کو اسے استعمال کرنے کے لیے configure کریں:
# Set proxy for git globally
git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080
# Or per-repository
git config http.proxy socks5://127.0.0.1:1080
کام مکمل ہونے پر proxy config ہٹا دیں:
git config --global --unset http.proxy
git config --global --unset https.proxy
VPN کے ساتھ SSH Tunneling
Remote Server Access
جب آپ کو untrusted networks سے servers پر SSH کرنا ہو، VPN آپ کے SSH traffic کے machine سے باہر نکلنے سے پہلے ہی ایک encryption layer شامل کر دیتا ہے:
freeguard connect --server us-west
ssh [email protected]
VPN کے ذریعے ProxyJump
multi-hop access کے لیے FreeGuard کو SSH ProxyJump کے ساتھ combine کریں:
# Connect to VPN first
freeguard connect
# Then jump through a bastion host
ssh -J [email protected] [email protected]
Port Forwarding
remote ports کو VPN tunnel کے ذریعے forward کریں:
freeguard connect --server eu-west
ssh -L 5432:db.internal:5432 [email protected]
# Now connect to localhost:5432 to reach the remote database
API Development
curl کے ساتھ Testing
مختلف regions سے test کرنے کے لیے اپنی API requests کو VPN کے ذریعے route کریں:
freeguard connect --server jp-tokyo
# Test geo-specific API responses
curl -s https://api.example.com/v1/content | jq '.region'
# Output: "ap-northeast-1"
freeguard connect --server de-frankfurt
curl -s https://api.example.com/v1/content | jq '.region'
# Output: "eu-central-1"
httpie کا استعمال
httpie بھی اسی طرح کام کرتا ہے۔ FreeGuard CLI system level پر operate کرتا ہے، اس لیے تمام HTTP clients کو فائدہ ہوتا ہے:
freeguard connect --server uk-london
http GET https://api.example.com/v1/pricing Accept:application/json
Selective Routing کے لیے Proxy Mode
اگر آپ صرف کچھ requests کو VPN کے ذریعے بھیجنا چاہتے ہیں تو local proxy استعمال کریں:
# Start FreeGuard with local proxy
freeguard connect
# Route specific requests through the proxy
curl --proxy socks5://127.0.0.1:1080 https://api.example.com/endpoint
# Direct requests bypass VPN
curl https://internal.company.com/api
Docker Containers + VPN
Container Network کو VPN کے ذریعے چلانا
Docker container traffic کو FreeGuard کے ذریعے route کریں:
# Connect host to VPN
freeguard connect --server us-east
# Containers using host network will route through VPN
docker run --network host my-app:latest
Docker Compose Integration
اپنے development stack میں VPN connectivity شامل کریں:
#!/bin/bash
# dev-start.sh
freeguard connect --server us-east --json | jq -r '.status'
docker compose up -d
echo "Development stack is running through VPN"
Restrictive Networks کے پیچھے Images Building
جب docker build کو ایسے registries سے packages download کرنے ہوں جو blocked یا slow ہیں:
freeguard connect --server us-west
docker build --network host -t my-app:latest .
freeguard disconnect
CI/CD Integration
GitHub Actions
اپنی CI pipeline میں FreeGuard CLI استعمال کریں تاکہ builds کے دوران geo-restricted resources تک رسائی حاصل ہو:
- name: Connect VPN
run: |
curl -fsSL https://cli.freeguard.com/install.sh | bash
freeguard login --method token --token ${{ secrets.FREEGUARD_TOKEN }}
freeguard connect --server us-east --json
Script-Friendly Output
ہر FreeGuard CLI command machine-readable output کے لیے --json اور صاف log files کے لیے --no-color کو support کرتا ہے:
# Get connection status as JSON
freeguard status --json
# {"connected": true, "server": "us-east-1", "protocol": "hysteria2", "uptime": 3600}
# List servers as JSON for programmatic selection
freeguard servers --json --region us | jq '.[0].id'
Exit Codes
CLI standard exit codes استعمال کرتا ہے جنہیں scripts چیک کر سکتے ہیں:
| Exit Code | معنی |
|---|---|
| 0 | کامیابی |
| 1 | عمومی error |
| 2 | Authentication درکار ہے |
| 3 | Connection failed |
| 4 | Server نہیں ملا |
freeguard connect --server us-east
if [ $? -eq 0 ]; then
echo "VPN connected, starting deployment..."
./deploy.sh
fi
روزمرہ استعمال کے لیے Tips
- Shell alias — اپنے shell profile میں
alias vpn="freeguard connect"اورalias vpnoff="freeguard disconnect"شامل کریں۔ - Auto-connect — اگر آپ ہمیشہ VPN on رکھنا چاہتے ہیں تو اپنی
.zshrcیا.bashrcمیںfreeguard connectشامل کریں۔ - Server bookmarks —
--serverflag سے بچنے کے لیےfreeguard config set default-server us-eastاستعمال کریں۔ - Status in prompt — اپنے shell prompt میں VPN status دکھانے کے لیے
freeguard status --jsonکو parse کریں۔
اگلے مراحل
- FreeGuard CLI — installation اور مکمل command reference
- CLI command documentation — ہر command اور flag کی تفصیلی reference
- Deploy on headless servers — FreeGuard CLI کو system service کے طور پر چلائیں
- Pricing — developers کے لیے موزوں plans
Last updated: March 2026