atauenis / webone

HTTP 1.x proxy that makes old web browsers usable again in the Web 2.0 world.
Other
518 stars 18 forks source link

HTTPS Streams not working when using default config. #102

Closed GitHubProUser67 closed 1 year ago

GitHubProUser67 commented 1 year ago

In the server, it seems using https content always fails with the error : Oops: The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'. (Parameter 'chars').

atauenis commented 1 year ago

Which OS is on the server, which browser is client, and which URLs you're attempting to open via proxy?

GitHubProUser67 commented 1 year ago

Okay, let's wrap up the test case.

My server OS is windows 11 64bits. The client, 2 configs were tested.

-> Chrome Web browser 116.0.5845.141

-> PS3 Client when using PlayStation Home HTTP Api.

I am attempting to open just the server main web page (writing a fork of your project focused on gaming consoles).

In that case https://127.0.0.1/ and https://localhost/.

I used 2 port, 443 and 10010, booth fails to establish the tls signal.

atauenis commented 1 year ago

No, the status page and the PAC script are not accessible via HTTPS. Only https:// sites are working through WebOne HTTPS tunnel.

GitHubProUser67 commented 1 year ago

Okay! so in theory I can point out a https website such as github and do the conversion via the proxy then!

GitHubProUser67 commented 1 year ago

https://github.com/atauenis/webone/assets/127040195/66ff71b8-e9a6-4561-a314-c50eae55a51d

Btw, I will update the github of my project so my fork is in line with your license, but long story short, you did an amazing job with this API, hands down.

PS: Yeah, I tried several time with the keyboard to type properly ^^.

atauenis commented 1 year ago

Thanks! :) Nice to see that all is working. I'm assume this game uses an SSL tunnel to connect to its server?

GitHubProUser67 commented 1 year ago

Yes, it uses a SSL tunnel to initiate a XML download at boot, for now we work-around to HTTP as we were using a simple HTTPListener based in-house server, but I wanted to incorporate your API for the main server (there are a ton of server in this game), and supporting https via tcp directly was a must for me, I haven't deeply looked into it yet (I just finished the integration to our custom devops-all-in-one solution), but I wonder if it possible to make it load a file from hard drive and transmit it via proxy.

GitHubProUser67 commented 1 year ago

Also, it seems requesting an other server using the proxy does the same problem, on my DNS I redirect requests to webone, bit it does the same issue as requesting the local page.

atauenis commented 1 year ago

Yes, WebOne accepts only HTTP/HTTPS proxy-style requests (GET/POST/etc for http:// urls and CONNECT for https:// urls). Not real 443-port connections. So a just DNS spoof is not enough in case of HTTPS. At least, at current moment. :) I may be implement support for use DNS spoofing together with WebOne later (not in 0.16).