L
L
LamerFromSpace2020-02-13 18:17:21
go
LamerFromSpace, 2020-02-13 18:17:21

How to use SOCKS5 in Golang?

I'm trying to work with a bot in TG, I'm trying this code:

dialer, err := proxy.SOCKS5("tcp", prox.IP+":"+prox.Port, nil, proxy.Direct)
  if err != nil {
    log.Fatalln("can't connect to the proxy:", err)
  }

  client2 = &http.Client{
    Transport: &http.Transport{
      Dial: dialer.Dial,
    },
  }


I get this result. CHADNT?
socks connect tcp 82.196.11.105:1080->api.telegram.org:443: unexpected EOF

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Dubrovin, 2020-02-13
@LamerFromSpace

Perhaps you all do this and the RKN does everything this way, try at least running a proxy on a non-standard port and first try connecting to something less blocked.

Z
zlo1, 2020-02-14
@zlo1

public Socks5 , if there is no Telegram icon opposite the proxy, it is in the lists of RKN

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question