2022-04-29 13:38:49 -04:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"go.balki.me/tss/proxy"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
client, err := proxy.GetClient("socks5://unix/run/tor/socks")
|
|
|
|
res, err := client.Get("https://ip.balki.me")
|
|
|
|
if err != nil {
|
|
|
|
log.Panicln(err)
|
|
|
|
}
|
|
|
|
data, err := io.ReadAll(res.Body)
|
|
|
|
if err != nil {
|
|
|
|
log.Panicln(err)
|
|
|
|
}
|
|
|
|
fmt.Printf("status: %v, data: %s\n", res.Status, data)
|
2022-05-01 19:13:27 -04:00
|
|
|
fmt.Printf("%#v\n", client.Transport)
|
2022-04-29 13:38:49 -04:00
|
|
|
}
|