Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

elderapo/cloudflare-ws-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to reproduce: set DOMAIN in .env

yarn install
cloudflared --hostname DOMAIN --url 127.0.0.1 # replace DOMAIN with domain from .env
# wait for tunnel to start and estabilish
yarn start

Example output (replaced used domain with DOMAIN):

yarn run v1.6.0
$ node ./index.js
server is listening on 80


Sending request to: http(http://localhost)
HTTP host from headers localhost


Sending request to: http(https://DOMAIN)
HTTP host from headers DOMAIN


Sending request to: http(https://DOMAIN)
HTTP host from headers DOMAIN


Sending request to: ws(ws://localhost)
WS host from headers localhost:80


Sending request to: ws(wss://DOMAIN)
WS host from headers 127.0.0.1
AssertionError [ERR_ASSERTION]: ws(DOMAIN) should return "DOMAIN" but instead it returned "127.0.0.1" <--- "127.0.0.1" was set in cloudflared as --url

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published