Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/GlenKPeterson/http2-server-jar-sample
Minimal project for reproducing Jetty HTTP/2 kotlin server jar file issues
https://github.com/GlenKPeterson/http2-server-jar-sample
http2 https java jetty jetty-server kotlin tls tls13
Last synced: 23 days ago
JSON representation
Minimal project for reproducing Jetty HTTP/2 kotlin server jar file issues
- Host: GitHub
- URL: https://github.com/GlenKPeterson/http2-server-jar-sample
- Owner: GlenKPeterson
- Created: 2019-10-02T21:38:19.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-07T22:10:46.000Z (over 2 years ago)
- Last Synced: 2024-07-30T20:54:38.227Z (4 months ago)
- Topics: http2, https, java, jetty, jetty-server, kotlin, tls, tls13
- Language: Kotlin
- Homepage:
- Size: 35.2 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HTTP/2 Server Jar Sample (in Jetty)
This is neither approved nor endorsed by the Jetty project, Eclispe Foundation, or similar.
It's just a minimal project for reproducing and solving my personal jetty HTTP/2 issues.
It has a very simple HTML5 file hard-coded in the Kotlin code.## To Build
Requires:
* Java (I use openjdk11)
* MavenCommand:
```bash
mvn clean package
```
## To Run
```text
java -jar target/ROOT.jar
```
or to debug javax.net:
```text
java -Djavax.net.debug=all -jar target/ROOT.jar
```## Solved Problems:
1. [Fat jar file doesn't return HTTP responses](problem1.md)
2. [IE11/Win7 not working with Jetty/Conscrypt/ALPN](problem2.md)## Extras
### Debugging Jetty
Edit `src/main/resources/logback.xml` and change `` to ``### Certificate Creation:
```bash
sudo $JAVA_HOME/bin/keytool \
-alias jetty \
-dname "CN=jettyHttp2Sample.organicdesign.org, OU=Testing, O=OrganicDesign, L=Upstate, ST=South Carolina, C=US" \
-genkeypair \
-keyalg EC \
-keysize 256 \
-keystore src/main/resources/keystore \
-sigalg SHA256withECDSA \
-storetype pkcs12 \
-validity 1096
```
### Test TLS/SSL ciphers
with curl (this is what success looks like):
```bash
$ curl --insecure https://localhost:8443 -D headers.txt
Test Page
It works!
Working.
$ cat headers.txt
HTTP/2 200
server: Jetty(9.4.20.v20190813)
content-type: text/html;charset=utf-8
```with nmap (simple cipher test):
```bash
nmap --script ssl-enum-ciphers -p 8443 localhost
```with testssl.sh (detalied cipher test):
```bash
testssl.sh localhost:8443
```with browser: https://localhost:8443/