개발자를 위한 Terminal Proxy 워크플로우
FreeGuard CLI는 암호화된 VPN 터널을 통해 트래픽을 라우팅하여 터미널을 안전한 개발 환경으로 바꿉니다. 제한된 네트워크에서 저장소를 복제하든, 여러 지역의 API를 디버깅하든, 보안 채널을 통해 컨테이너를 배포하든, CLI는 git, ssh, curl, docker 등 이미 사용 중인 도구에 통합됩니다.

개발자를 위한 Terminal Proxy 워크플로우

FreeGuard CLI는 암호화된 VPN 터널을 통해 트래픽을 라우팅하여 터미널을 안전한 개발 환경으로 바꿉니다. 제한된 네트워크에서 저장소를 복제하든, 여러 지역의 API를 디버깅하든, 보안 채널을 통해 컨테이너를 배포하든, CLI는 git, ssh, curl, docker 등 이미 사용 중인 도구에 통합됩니다.

개발자가 Terminal Proxy가 필요한 이유

많은 개발 작업에는 VPN 보호의 이점을 얻는 네트워크 액세스가 포함됩니다:

  • 카페나 공항에서 내부 API에 액세스
  • 개발 중 지역 제한 서비스 테스트
  • git 트래픽을 제한하거나 검사하는 네트워크를 통해 코드 푸시
  • 제한적인 방화벽을 통해 원격 서버에 연결
  • CI/CD 자격 증명을 전송 중에도 암호화 상태로 유지

FreeGuard CLI는 이 모든 작업을 터미널을 벗어나지 않고 처리합니다.


VPN을 통한 Git

문제

기업 네트워크, 공용 Wi-Fi, 일부 ISP는 git 작업을 제한하거나 차단합니다. SSH 기반 git 연결은 심층 패킷 검사에 의해 탐지될 수 있습니다. HTTPS 복제는 투명 프록시에 의해 가로채질 수 있습니다.

해결 방법

git 작업 전에 FreeGuard에 연결하세요:

freeguard connect --server us-east

git clone [email protected]:your-org/private-repo.git
git fetch --all
git push origin feature-branch

freeguard disconnect

보다 자동화된 방법으로는 스크립트에 감싸면 됩니다:

#!/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은 스크립트가 중간에 실패하더라도 VPN이 연결 해제되도록 보장합니다.

프록시 인식 Git

FreeGuard CLI는 로컬 SOCKS5 또는 HTTP 프록시도 노출할 수 있습니다. git이 이를 사용하도록 구성하세요:

# 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

작업이 끝나면 프록시 구성을 제거하세요:

git config --global --unset http.proxy
git config --global --unset https.proxy

VPN을 사용한 SSH 터널링

원격 서버 액세스

신뢰할 수 없는 네트워크에서 서버에 SSH로 접속해야 할 때, VPN은 SSH 트래픽이 장치를 벗어나기 전에 암호화 계층을 추가합니다:

freeguard connect --server us-west
ssh [email protected]

VPN을 통한 ProxyJump

다중 홉 액세스를 위해 FreeGuard를 SSH ProxyJump와 결합하세요:

# Connect to VPN first
freeguard connect

# Then jump through a bastion host
ssh -J [email protected] [email protected]

포트 포워딩

VPN 터널을 통해 원격 포트를 포워딩하세요:

freeguard connect --server eu-west
ssh -L 5432:db.internal:5432 [email protected]
# Now connect to localhost:5432 to reach the remote database

API 개발

curl로 테스트

서로 다른 지역에서 테스트할 수 있도록 API 요청을 VPN을 통해 라우팅하세요:

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는 시스템 수준에서 작동하므로 모든 HTTP 클라이언트가 이점을 얻습니다:

freeguard connect --server uk-london
http GET https://api.example.com/v1/pricing Accept:application/json

선택적 라우팅을 위한 Proxy Mode

특정 요청만 VPN을 통해 보내고 싶다면 로컬 프록시를 사용하세요:

# 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 컨테이너 + VPN

VPN을 통한 컨테이너 네트워크

Docker 컨테이너 트래픽을 FreeGuard를 통해 라우팅하세요:

# 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 통합

개발 스택에 VPN 연결 기능을 추가하세요:

#!/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"

제한적인 네트워크 뒤에서 이미지 빌드하기

docker build가 차단되었거나 느린 레지스트리에서 패키지를 다운로드해야 할 때:

freeguard connect --server us-west
docker build --network host -t my-app:latest .
freeguard disconnect

CI/CD 통합

GitHub Actions

빌드 중 지역 제한 리소스에 액세스하기 위해 CI 파이프라인에서 FreeGuard CLI를 사용하세요:

- 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

스크립트 친화적 출력

모든 FreeGuard CLI 명령은 기계 판독 가능한 출력을 위한 --json과 깔끔한 로그 파일을 위한 --no-color를 지원합니다:

# 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'

종료 코드

CLI는 스크립트가 확인할 수 있는 표준 종료 코드를 사용합니다:

Exit Code 의미
0 성공
1 일반 오류
2 인증 필요
3 연결 실패
4 서버를 찾을 수 없음
freeguard connect --server us-east
if [ $? -eq 0 ]; then
  echo "VPN connected, starting deployment..."
  ./deploy.sh
fi

일상 사용 팁

  1. 셸 별칭 — 셸 프로필에 alias vpn="freeguard connect"alias vpnoff="freeguard disconnect"를 추가하세요.
  2. 자동 연결 — 항상 VPN을 켜 두고 싶다면 .zshrc 또는 .bashrcfreeguard connect를 추가하세요.
  3. 서버 북마크--server 플래그를 건너뛰려면 freeguard config set default-server us-east를 사용하세요.
  4. 프롬프트의 상태 표시freeguard status --json을 파싱하여 셸 프롬프트에 VPN 상태를 표시하세요.

다음 단계

Last updated: March 2026