hilbix / hcloud-console Goto Github PK
View Code? Open in Web Editor NEWHetznerCloud => WebSock => NoVNC
License: Other
HetznerCloud => WebSock => NoVNC
License: Other
Momentan verstehe ich nicht, wie man über das von der Hetzner-Cloud-API gelieferte Websocket-URL auf die NoVNC-Verbindung kommen soll:
502 Bad Gateway
von NginX gemeldet, irgendein Detail fehlt das ich bisher nicht finden konnteHinweise:
NoVNC kann derzeit keine WSS-URLs direkt verwenden. WTF? Man muss das in den Host, Port und Pfad splitten. Doof. Sollte aber gehen, aber momentan ist da noch 502 Bad Gateway
im Weg
Ruft man das URL mit falschen Credentials auf, dann kommt ein 401 Unauthorized
.
Ruft man das URL mit unbekannter Server-ID auf, dann kommt ein 422
, das entspricht Unprocessable Entity
.
401
rausgeben wie bei falschen CredentialsRuft man es mit korrektem von der API gelieferten URL auf, kommt hingegen 502
. Sprich, es ist ein deutlicher Unterschied zum Fehlerfall zu sehen.
url="https://${1#*wss://}"
url="${url%%#*}"
echo "URL: $url"
curl --http1.1 -s -v -N -D- -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Origin: https://www.example.org" "$url" 2>&1
Kine Ahnung was mir das "Expire in X ms for Y" da sagen will, aber ich habe es mal dringelassen:
URL: https://web-console.hetzner.cloud/?server_id=HIERSTEHTNEZAHL&token=HIERSTEHTEINTOKEN
[..]
* Trying 213.239.246.1...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x5572a098b280)
* Connected to web-console.hetzner.cloud (213.239.246.1) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [112 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2644 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [300 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [37 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=*.hetzner.cloud
* start date: Jul 26 00:00:00 2018 GMT
* expire date: Oct 25 12:00:00 2019 GMT
* subjectAltName: host "web-console.hetzner.cloud" matched cert's "*.hetzner.cloud"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=Thawte TLS RSA CA G1
* SSL certificate verify ok.
} [5 bytes data]
> GET /?server_id=HIERSTEHTNEZAHL&token=HIERSTEHTEINTOKEN HTTP/1.1
> Host: web-console.hetzner.cloud
> User-Agent: curl/7.64.0
> Accept: */*
> Connection: Upgrade
> Upgrade: websocket
> Origin: https://www.example.org
>
{ [5 bytes data]
< HTTP/1.1 502 Bad Gateway
HTTP/1.1 502 Bad Gateway
< Server: nginx
Server: nginx
< Date: Fri, 20 Sep 2019 08:22:11 GMT
Date: Fri, 20 Sep 2019 08:22:11 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 0
Content-Length: 0
< Connection: keep-alive
Connection: keep-alive
< ETag: "5d666872-0"
ETag: "5d666872-0"
< Strict-Transport-Security: max-age=3600; preload
Strict-Transport-Security: max-age=3600; preload
<
* Connection #0 to host web-console.hetzner.cloud left intact
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.