-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Early Data and Custom Header Support to HTTPUpgrade Transport (#3276
) * Add early reply draining for httpupgrade * Add early data config for httpupgrade * Add early data implementation for httpupgrade * Add send extra header for httpupgrade
- Loading branch information
1 parent
f0a87b9
commit 4c1d948
Showing
10 changed files
with
639 additions
and
78 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
testing/scenarios/config/httpupgrade_earlydataShortEarlyData_client.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"log": { | ||
"error": { | ||
"level": "Debug", | ||
"type": "Console" | ||
}, | ||
"access": { | ||
"type": "None" | ||
} | ||
}, | ||
"outbounds": [ | ||
{ | ||
"protocol": "vmess", | ||
"settings": { | ||
"address": "127.0.0.1", | ||
"port": 17793, | ||
"uuid": "bcc71618-e552-42c2-a2a3-d4c17a9df764" | ||
}, | ||
"streamSettings": { | ||
"transport": "httpupgrade", | ||
"transportSettings": { | ||
"path": "b66efc0c7752", | ||
"maxEarlyData": 32, | ||
"earlyDataHeaderName": "Sec-Websocket-Key" | ||
}, | ||
"security": "tls", | ||
"securitySettings": { | ||
"pinnedPeerCertificateChainSha256": [ | ||
"kqHyvea27Pn+JiSqA72lhu9IKAKeGR+3yCyA8JR1mug=" | ||
], | ||
"allowInsecureIfPinnedPeerCertificate": true | ||
} | ||
} | ||
} | ||
], | ||
"inbounds": [ | ||
{ | ||
"protocol": "socks", | ||
"settings": { | ||
"udpEnabled": false, | ||
"address": "127.0.0.1", | ||
"packetEncoding": "Packet" | ||
}, | ||
"port": 17794, | ||
"listen": "127.0.0.1" | ||
} | ||
] | ||
} |
46 changes: 46 additions & 0 deletions
46
testing/scenarios/config/httpupgrade_earlydataShortEarlyData_server.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"log": { | ||
"error": { | ||
"level": "Debug", | ||
"type": "Console" | ||
}, | ||
"access": { | ||
"type": "None" | ||
} | ||
}, | ||
"outbounds": [ | ||
{ | ||
"protocol": "freedom" | ||
} | ||
], | ||
"inbounds": [ | ||
{ | ||
"listen": "127.0.0.1", | ||
"port": 17793, | ||
"protocol": "vmess", | ||
"settings": { | ||
"users": [ | ||
"bcc71618-e552-42c2-a2a3-d4c17a9df764" | ||
] | ||
}, | ||
"streamSettings": { | ||
"transport": "httpupgrade", | ||
"transportSettings": { | ||
"path": "b66efc0c7752", | ||
"maxEarlyData": 32, | ||
"earlyDataHeaderName": "Sec-Websocket-Key" | ||
}, | ||
"security": "tls", | ||
"securitySettings": { | ||
"certificate": [ | ||
{ | ||
"usage": "ENCIPHERMENT", | ||
"certificateFile": "cert/self-signed_cert.pem", | ||
"keyFile": "cert/self-signed_key.pem" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
48 changes: 48 additions & 0 deletions
48
testing/scenarios/config/httpupgrade_earlydata_client.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"log": { | ||
"error": { | ||
"level": "Debug", | ||
"type": "Console" | ||
}, | ||
"access": { | ||
"type": "None" | ||
} | ||
}, | ||
"outbounds": [ | ||
{ | ||
"protocol": "vmess", | ||
"settings": { | ||
"address": "127.0.0.1", | ||
"port": 17793, | ||
"uuid": "bcc71618-e552-42c2-a2a3-d4c17a9df764" | ||
}, | ||
"streamSettings": { | ||
"transport": "httpupgrade", | ||
"transportSettings": { | ||
"path": "b66efc0c7752", | ||
"maxEarlyData": 2048, | ||
"earlyDataHeaderName": "Sec-Websocket-Key" | ||
}, | ||
"security": "tls", | ||
"securitySettings": { | ||
"pinnedPeerCertificateChainSha256": [ | ||
"kqHyvea27Pn+JiSqA72lhu9IKAKeGR+3yCyA8JR1mug=" | ||
], | ||
"allowInsecureIfPinnedPeerCertificate": true | ||
} | ||
} | ||
} | ||
], | ||
"inbounds": [ | ||
{ | ||
"protocol": "socks", | ||
"settings": { | ||
"udpEnabled": false, | ||
"address": "127.0.0.1", | ||
"packetEncoding": "Packet" | ||
}, | ||
"port": 17794, | ||
"listen": "127.0.0.1" | ||
} | ||
] | ||
} |
46 changes: 46 additions & 0 deletions
46
testing/scenarios/config/httpupgrade_earlydata_server.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"log": { | ||
"error": { | ||
"level": "Debug", | ||
"type": "Console" | ||
}, | ||
"access": { | ||
"type": "None" | ||
} | ||
}, | ||
"outbounds": [ | ||
{ | ||
"protocol": "freedom" | ||
} | ||
], | ||
"inbounds": [ | ||
{ | ||
"listen": "127.0.0.1", | ||
"port": 17793, | ||
"protocol": "vmess", | ||
"settings": { | ||
"users": [ | ||
"bcc71618-e552-42c2-a2a3-d4c17a9df764" | ||
] | ||
}, | ||
"streamSettings": { | ||
"transport": "httpupgrade", | ||
"transportSettings": { | ||
"path": "b66efc0c7752", | ||
"maxEarlyData": 2048, | ||
"earlyDataHeaderName": "Sec-Websocket-Key" | ||
}, | ||
"security": "tls", | ||
"securitySettings": { | ||
"certificate": [ | ||
{ | ||
"usage": "ENCIPHERMENT", | ||
"certificateFile": "cert/self-signed_cert.pem", | ||
"keyFile": "cert/self-signed_key.pem" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.