You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: improve certificate fingerprint support for WebTransport
- Add automatic generation of WebTransport-compatible certificates
- ECDSA algorithm, 14-day validity, self-signed
- Generated when no cert files are provided
- Add certificate validation to warn if requirements not met
- Change default listening address to 0.0.0.0:4443
- Disable fingerprint server by default (port 0)
- Add generate-webtransport-cert.sh script for manual cert generation
- Update documentation with simplified fingerprint usage
This makes it easier to use WebTransport fingerprints for development
without needing to manually generate certificates with specific properties.
> go run . -cert cert.pem -key key.pem -addr localhost:4443
117
+
> go run . -cert cert.pem -key key.pem
118
118
```
119
119
120
120
#### Using certificate fingerprint
121
121
122
-
Alternatively, you can use the certificate fingerprint feature for self-signed certificates without installing them in the browser:
122
+
For browsers that support WebTransport certificate fingerprints (e.g., Chrome), you can use self-signed certificates without installing them:
123
123
124
+
**Run mlmpub with fingerprint support**:
124
125
```sh
125
-
> go run . -cert cert.pem -key key.pem -addr 0.0.0.0:4443 -fingerprintport 8081
126
+
> go run . -fingerprintport 8081
127
+
```
128
+
129
+
This will automatically generate a WebTransport-compatible certificate with:
130
+
- ECDSA algorithm (not RSA)
131
+
- 14-day validity (WebTransport maximum)
132
+
- Self-signed
133
+
134
+
Alternatively, you can use your own certificate (e.g., generated with the included `generate-webtransport-cert.sh` script):
135
+
```sh
136
+
cd cmd/mlmpub
137
+
./generate-webtransport-cert.sh
138
+
go run . -cert cert-fp.pem -key key-fp.pem -fingerprintport 8081
126
139
```
127
140
128
141
This will:
129
-
- Start the MoQ server on port 4443 (listening on all interfaces)
142
+
- Start the MoQ server on port 4443 (default address is `0.0.0.0:4443`, listening on all interfaces)
130
143
- Start an HTTP server on port 8081 that serves the certificate's SHA-256 fingerprint
144
+
- Validate that the certificate meets WebTransport requirements
145
+
146
+
The warp-player (fingerprint branch) can then connect using:
147
+
- Server URL: `https://localhost:4443/moq` or `https://127.0.0.1:4443/moq`
148
+
- Fingerprint URL: `http://localhost:8081/fingerprint` or `http://127.0.0.1:8081/fingerprint`
131
149
132
-
The warp-player can then connect using the fingerprint URL to authenticate the self-signed certificate. Use `-fingerprintport 0` to disable the fingerprint server.
150
+
**Notes**:
151
+
- The fingerprint server is disabled by default (`-fingerprintport 0`). Only enable it when using certificates that meet WebTransport's strict requirements.
152
+
- If no certificate files are provided, mlmpub will generate WebTransport-compatible certificates automatically.
0 commit comments