1

When I try to use proxy in my web socket sharp client it says "An invalid proxy authentication challenge is specified.", even if proxy credentials are correct, if I try to set that proxy as browser proxy it works fine. What could be the problem?

My code:

        static WebSocket socket;

        socket = new WebSocket("ws://" + "example.com:8080", "guacamole");
        socket.OnClose += OnClose;
        socket.OnOpen += OnOpen;
        socket.OnMessage += OnMessage;
        socket.Compression = CompressionMethod.Deflate;

        socket.SetProxy("http://" + "exampleproxy.com:31112", proxyUser, proxyPass);

        socket.Connect();
TempGuy
  • 11
  • 2
  • Please add more details to your question, currently it is very hard to say anything because of too few details – SENya Jul 10 '21 at 10:14
  • @SENya I am using websocket-sharp library, my client successfully connects to the web server but when I use SetProxy(function from websocket-sharp library(https://github.com/sta/websocket-sharp) it says "An invalid proxy authentication challenge is specified.", but I know that credentials of proxy are correct. – TempGuy Jul 10 '21 at 12:45
  • Could you please edit the question and add your code the function, so it would be easier to find out what is missing. Or you can make a demo example which would be equivalent to your code if it is not possible to share it. – SENya Jul 10 '21 at 14:09
  • There are very few details in you question for readers to provide a useful answer. It's important to know what the code looks like to provide help with it. For example, here is a question with a great number of details: https://stackoverflow.com/questions/21692193/why-not-inherit-from-listt?rq=1 – SENya Jul 10 '21 at 14:14
  • 1
    @SENya I updated my question, without socket.SetProxy, my client connects to my server but when I use SetProxy, the client returns "An invalid proxy authentication challenge is specified." error, I know that proxy works and credentials are correct then what could be the problem? – TempGuy Jul 11 '21 at 05:37

0 Answers0