Context

지역 차단되어 있는 웹사이트 접근이 필요했는데, 무료 VPN들은 다 차단되어 있음. Claude가 이미 띄워져 있는 미국 region EC2를 활용하는 SOCKS proxy 사용을 제안함.

What I Learned

SOCKS (Socket Secure) is a network protocol for routing client to server requests made through a proxy server.

SOCKS proxies (unlike HTTP proxies) are flexible and protocol-agnostic. They simply pass along the data packets without necessarily understanding the underlying protocol (like HTTP, HTTPS, FTP, etc.). It operates at a low level.

SOCKS proxies simply relay data w/o analyzing it - resulting better performance & anonymity - and does not encrypt data as a trade-off.

Both SOCKS5 proxies and VPNs mask IP addresses, but they function differently.

  • A VPN works at the operating system level, encrypting and routing all internet traffic from your device through the VPN server.
  • A SOCKS5 proxy doesn’t offer encryption and operates on the application level- generally faster and more lightweight.

아래처럼 터미널에서 백그라운드로 터널을 연결하고 FoxyProxy Chrome extension을 활용하여 SOCKS5 proxy를 설정했다.

Code

ssh -i "pem-key-for-us-region-ec2.pem" -D 1080 -N -q ec2-user@ec2-address.us-region.compute.amazonaws.com

Note

접근 성공!

← All TIL