Skip to content

Instantly share code, notes, and snippets.

@robd003
Created December 10, 2024 04:05
Show Gist options
  • Save robd003/5cac5257cae5ae6a3077dfb8641abe6f to your computer and use it in GitHub Desktop.
Save robd003/5cac5257cae5ae6a3077dfb8641abe6f to your computer and use it in GitHub Desktop.
Nginx github.com IPv6 -> IPv4 proxy
stream {
server {
listen [2600:your:ip:here::1]:22 fastopen=100 ipv6only=on;
proxy_pass github.com:22;
}
server {
listen [2600:your:ip:here::1]:443 fastopen=100 ipv6only=on;
proxy_pass github.com:443;
}
server {
listen [2600:your:ip:here::2]:443 fastopen=100 ipv6only=on;
proxy_pass api.github.com:443;
}
server {
listen [2600:your:ip:here::3]:443 fastopen=100 ipv6only=on;
proxy_pass codeload.github.com:443;
}
server {
listen [2600:your:ip:here::4]:443 fastopen=100 ipv6only=on;
proxy_pass objects.githubusercontent.com:443;
}
server {
listen [2600:your:ip:here::5]:443 fastopen=100 ipv6only=on;
proxy_pass ghcr.io:443;
}
server {
listen [2600:your:ip:here::6]:443 fastopen=100 ipv6only=on;
proxy_pass pkg.github.com:443;
}
server {
listen [2600:your:ip:here::7]:443 fastopen=100 ipv6only=on;
proxy_pass uploads.github.com:443;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment