Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localhost not running from Browser ? #145

Closed
abnvsally opened this issue Oct 25, 2020 · 2 comments
Closed

localhost not running from Browser ? #145

abnvsally opened this issue Oct 25, 2020 · 2 comments

Comments

@abnvsally
Copy link

Hi
I'm not able to open the index.html on browser like chrome canary etc. After enabling quic in canary when I try to run https://localhost:4433/ in the browser. It says site cannot be reached. Can you help me where I'm going wrong.

Thanks

@jlaine
Copy link
Contributor

jlaine commented Oct 27, 2020

Chrome will not initially attempt HTTP/3, it will try a regular HTTP request and switch to HTTP/3 if the server announces support for it. This does not work if the server is HTTP/3 only.

See #127 for the appropriate flags to force HTTP/3 and accept the certificate

@jlaine jlaine closed this as completed Oct 27, 2020
@abnvsally
Copy link
Author

abnvsally commented Oct 30, 2020

I tried to use chrome and the commands you have mentioned to open the client in the browser but it does-not work. I tried to open the client using the chromium browser built from the chromium source code and localhost works in that. I do not even need to generate fingerprints for the certificate command to run client side in chromium. The commands for running chrome and chromium are mentioned below.

When I connect the client side using chrome I see TCP packets getting called from the browser. The reset packets are TCP as well. There are no UDP/QUIC packets coming from chrome browser and the local host gives site cannot be reached error. I have tried https://127.0.0.1:4433 as well as https://localhost:4433. Both show the same behavior.

I can see HTTP/3 when I use the curl command. The output is as follows: -

curl --http3 -I https://localhost:4433/
HTTP/3 200
server: aioquic/0.9.7
date: Fri, 30 Oct 2020 17:24:42 GMT
content-length: 1580
content-type: text/html; charset=utf-8

I use these commands for the chrome browser: -

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
--enable-quic
--ignore-certificate-errors-spki-list=BSQJ0jkQ7wwhR7KvPZ+DSNk2XTZ/MS6xCbo9qu++VdQ= --origin-to-force-quic-on=localhost:4433 \ https://localhost:4433/

I use the following commands for the chromium browser: -

out/Default/Chromium.app/Contents/MacOS/Chromium
--enable-quic
--origin-to-force-quic-on=localhost:4433 \ https://localhost:4433/

Wireshark output when trying to connect client using chrome is as below
No. Time Source Destination Protocol Length Info
1 0.000000 ::1 ::1 TCP 88 65379 → 4433 [SYN] Seq=0 Win=65535 Len=0 MSS=16324 WS=64 TSval=794210847 TSecr=0 SACK_PERM=1

Frame 1: 88 bytes on wire (704 bits), 88 bytes captured (704 bits) on interface lo0, id 0
Null/Loopback
No. Time Source Destination Protocol Length Info
2 0.000012 ::1 ::1 TCP 64 4433 → 65379 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0

Frame 2: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface lo0, id 0
Null/Loopback

No. Time Source Destination Protocol Length Info
3 0.000116 ::1 ::1 TCP 88 65380 → 4433 [SYN] Seq=0 Win=65535 Len=0 MSS=16324 WS=64 TSval=794210847 TSecr=0 SACK_PERM=1

Frame 3: 88 bytes on wire (704 bits), 88 bytes captured (704 bits) on interface lo0, id 0

No. Time Source Destination Protocol Length Info
4 0.000125 ::1 ::1 TCP 64 4433 → 65380 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0

Frame 4: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface lo0, id 0

No. Time Source Destination Protocol Length Info
5 0.000185 127.0.0.1 127.0.0.1 TCP 68 65381 → 4433 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=64 TSval=794210847 TSecr=0 SACK_PERM=1

Frame 5: 68 bytes on wire (544 bits), 68 bytes captured (544 bits) on interface lo0, id 0

No. Time Source Destination Protocol Length Info
6 0.000198 127.0.0.1 127.0.0.1 TCP 44 4433 → 65381 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0

Please let me know if I'm missing something here. Thanking you in anticipation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants