Emacs' erc proxy function seems broken?

Offical document said that erc can be used with socks lib, but I have tested these steps, it never works:

(require 'socks)
(setq
 socks-server '("my proxy" "172.17.1.2" 1080 5)
 socks-override-functions nil)

(setq erc-server-connect-function #'erc-open-socks-tls-stream)

And I also did some search and tried some other solutions, I got the same result.

Conclusion: it seems that erc can not be used with proxy, so I have to give up it.

Works for me using tor:

(setopt
  socks-server '("tor" "localhost" 9050 5)
  erc-server-connect-function #'erc-open-socks-tls-stream)

That’s all and then M-x erc-tls