Link

Proxy

References:

Table of contents

  1. Proxy
    1. V2Ray
    2. ssh
    3. frp
    4. proxychains4
    5. git
  • VPS (virtual private server): a virtual machine sold as a service by an Internet hosting service. The virtual dedicated server also has a similar meaning
  • NAS (Network-attached storage): a file-level computer data storage server connected to a computer network providing data access to a heterogeneous group of clients.

V2Ray

The time delay should be within 90 seconds. Every V2Ray node is a “switch”, which has inbounds and outbounds. V2Ray allows different protocol (listed below) at a bound.

  • blackhole (don’t relay the data)
  • freedom
  • Shadowsocks
  • VMess
systemctl start v2ray

ssh

Set GatewayPorts=yes in /etc/ssh/sshd_config at the relay. Use sudo service sshd restart to restart the ssh server.

Enable reverse proxy:

ssh -R 2222:localhost:22 relay@123.123.123.123
autossh -M 55555 -NfR 2222:localhost:22 relay@123.123.123.123

Port Forwarding (credit): For example, if we execute jupyter notebook in the remote server that listens to the port 8888. Thus, to forward that to the local port 9999, we would do ssh -L 9999:localhost:8888 foobar@remote_server and then navigate to locahost:9999 in our local machine.

Local Port Forwarding:

Remote Port Forwarding:

frp

frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the Internet. As of now, it supports TCP and UDP, as well as HTTP and HTTPS protocols, where requests can be forwarded to internal services by domain name.

proxychains4

brew install proxychains-ng`

git

git config --global http.proxy http://127.0.0.1:8080
git config --global --unset http.proxy