http-proxy-to-socks icon indicating copy to clipboard operation
http-proxy-to-socks copied to clipboard

error: read ECONNRESET on proxy 127.0.0.1:5000

Open pigovsky opened this issue 6 years ago • 4 comments

I have troubles using the app. The socks proxy is listening on localhost:5000 , but the app does not accept incoming connections

$ hpts -s 127.0.0.1:5000 -p 8080
SOCKS: 127.0.0.1:5000
http-proxy listening: http://127.0.0.1:8080
2018-08-10T09:21:45.586Z - error: read ECONNRESET on proxy 127.0.0.1:5000

pigovsky avatar Aug 10 '18 09:08 pigovsky

Listening SOCKS in different ports works on my OSX.

Does your SOCKS service support NO AUTHENTICATION REQUIRED method? Which is the only methods that hpts supports.

oyyd avatar Aug 11 '18 07:08 oyyd

My SOCKS service is just a SSH tunnel created using D5000 in KiTTY (PuTTY) I am able to send get requests via this service using following scala code:

import java.io.InputStream
import java.net.{InetSocketAddress, Proxy, URL}

object Client {
  val addr = new InetSocketAddress("localhost", 5000)
  val proxy = new Proxy(Proxy.Type.SOCKS, addr)

  def get(urlStr: String): String = {
    val conn = new URL(urlStr).openConnection(proxy)
    val stream: InputStream = conn.getInputStream
    val out = scala.io.Source.fromInputStream(stream).mkString
    stream.close()
    out
  }
}

pigovsky avatar Aug 17 '18 12:08 pigovsky

Me too hpts -s 127.0.0.1:1080 -p 8080 SOCKS: 127.0.0.1:1080 http-proxy listening: http://127.0.0.1:8080 2018-11-13T07:53:55.638Z - error: read ECONNRESET on proxy 127.0.0.1:1080

momoko8443 avatar Nov 13 '18 08:11 momoko8443

It's likely to be okay If ECONNRESET happen occasionally. (though I have no idea about pigovsky's issue)

oyyd avatar Nov 13 '18 12:11 oyyd