fetch

command
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

README

Outline Fetch

This app illustrates how to use different transports to fetch a URL in Go.

Direct fetch:

$ go run github.com/Jigsaw-Code/outline-sdk/x/tools/fetch@latest https://ipinfo.io
{
  ...
  "city": "Amsterdam",
  "region": "North Holland",
  "country": "NL",
  ...
}                                  

Using a Shadowsocks server:

$ go run github.com/Jigsaw-Code/outline-sdk/x/tools/fetch@latest -transport ss://[redacted]@[redacted]:80 https://ipinfo.io
{
  ...
  "region": "New Jersey",
  "country": "US",
  "org": "AS14061 DigitalOcean, LLC",
  ...
}

Using a SOCKS5 server:

$ go run github.com/Jigsaw-Code/outline-sdk/x/tools/fetch@latest -transport socks5://[redacted]:5703 https://ipinfo.io
{
  ... 
  "city": "Berlin",
  "region": "Berlin",
  "country": "DE",
  ...
}

Using packet splitting:

$ go run github.com/Jigsaw-Code/outline-sdk/x/tools/fetch@latest -transport split:3  https://ipinfo.io
{
  ...
  "city": "Amsterdam",
  "region": "North Holland",
  "country": "NL",
  ...
}                                  

You should see this on Wireshark:

image

Using ECH

Pass the -ech-config flag with the base64-encoded ECH Config in binary format (as per the standard proposal).

$ go -C x run ./tools/fetch https://test.defo.ie | grep SSL_ECH 
    <p>SSL_ECH_OUTER_SNI: NONE <br />
SSL_ECH_INNER_SNI: NONE <br />
SSL_ECH_STATUS: not attempted <img src="redx-small.png" alt="bummer" /> <br/>

$ dig +short test.defo.ie HTTPS
1 . ech=AEb+DQBCqQAgACBlm7cfDx/gKuUAwRTe+Y9MExbIyuLpLcgTORIdi69uewAEAAEAAQATcHVibGljLnRlc3QuZGVmby5pZQAA

$ go -C x run ./tools/fetch --ech-config=AEb+DQBCqQAgACBlm7cfDx/gKuUAwRTe+Y9MExbIyuLpLcgTORIdi69uewAEAAEAAQATcHVibGljLnRlc3QuZGVmby5pZQAA https://test.defo.ie | grep SSL_ECH
    <p>SSL_ECH_OUTER_SNI: public.test.defo.ie <br />
SSL_ECH_INNER_SNI: test.defo.ie <br />
SSL_ECH_STATUS: success <img src="greentick-small.png" alt="good" /> <br/>

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL