Skip to content

Instantly share code, notes, and snippets.

@zarmin
Created January 23, 2023 13:59
Show Gist options
  • Save zarmin/7654eed61e5e2c57da833ddac86ce8b7 to your computer and use it in GitHub Desktop.
Save zarmin/7654eed61e5e2c57da833ddac86ce8b7 to your computer and use it in GitHub Desktop.
Provide network to host via SSH
# first term
tinyproxy -d

# second term
ssh -R 8888:127.0.0.1:8888  <ssh host>

# after connect
# proxy env var
export HTTP_PROXY=http://127.0.0.1:8888
export HTTPS_PROXY=http://127.0.0.1:8888
# apt
apt -o Acquire::http::proxy="http://127.0.0.1:8888/" <apt command>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment