mirror of
https://gitea.invidious.io/iv-org/lsquic.cr
synced 2024-08-15 00:43:31 +00:00
Update to latest version of lsquic
This commit is contained in:
parent
5261034c0d
commit
96a75aae05
5 changed files with 63 additions and 63 deletions
|
@ -46,7 +46,3 @@ client.get("/", headers: HTTP::Headers{
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
- [Omar Roth](https://github.com/omarroth) - creator and maintainer
|
- [Omar Roth](https://github.com/omarroth) - creator and maintainer
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
name: lsquic
|
name: lsquic
|
||||||
version: 0.1.9
|
version: 2.18.1
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Omar Roth <omarroth@protonmail.com>
|
- Omar Roth <omarroth@protonmail.com>
|
||||||
|
|
||||||
crystal: 0.34.0
|
crystal: 0.35.1
|
||||||
|
|
||||||
license: MIT
|
license: MIT
|
||||||
|
|
|
@ -45,13 +45,25 @@ module QUIC
|
||||||
headers = [] of LibLsquic::LsxpackHeader
|
headers = [] of LibLsquic::LsxpackHeader
|
||||||
REQUIRED_HEADERS.each do |name|
|
REQUIRED_HEADERS.each do |name|
|
||||||
value = stream_ctx.request.headers[name]
|
value = stream_ctx.request.headers[name]
|
||||||
headers << LibLsquic::LsxpackHeader.new(name_ptr: name, name_len: name.bytesize, buf: value, val_len: value.bytesize)
|
headers << LibLsquic::LsxpackHeader.new(
|
||||||
|
buf: "#{name}#{value}",
|
||||||
|
name_len: name.bytesize,
|
||||||
|
name_offset: 0,
|
||||||
|
val_len: value.bytesize,
|
||||||
|
val_offset: name.bytesize
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
request_headers.each do |name, values|
|
request_headers.each do |name, values|
|
||||||
name = name.downcase
|
name = name.downcase
|
||||||
next if REQUIRED_HEADERS.includes? name
|
next if REQUIRED_HEADERS.includes? name
|
||||||
headers << LibLsquic::LsxpackHeader.new(name_ptr: name, name_len: name.bytesize, buf: values[0], val_len: values[0].bytesize)
|
headers << LibLsquic::LsxpackHeader.new(
|
||||||
|
buf: "#{name}#{values[0]}",
|
||||||
|
name_len: name.bytesize,
|
||||||
|
name_offset: 0,
|
||||||
|
val_len: values[0].bytesize,
|
||||||
|
val_offset: name.bytesize
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
http_headers = LibLsquic::HttpHeaders.new(count: headers.size, headers: headers.to_unsafe)
|
http_headers = LibLsquic::HttpHeaders.new(count: headers.size, headers: headers.to_unsafe)
|
||||||
|
|
Binary file not shown.
|
@ -1,67 +1,59 @@
|
||||||
@[Link(ldflags: "#{__DIR__}/ext/liblsquic.a")]
|
@[Link(ldflags: "#{__DIR__}/ext/liblsquic.a")]
|
||||||
lib LibLsquic
|
lib LibLsquic
|
||||||
MAX_CID_LEN = 20
|
LSENG_SERVER = 1
|
||||||
QQUIC_CID_LEN = 8
|
LSENG_HTTP = 2
|
||||||
LSENG_SERVER = 1
|
|
||||||
LSENG_HTTP = 2
|
|
||||||
LSENG_HTTP_SERVER = LSENG_SERVER | LSENG_HTTP
|
LSENG_HTTP_SERVER = LSENG_SERVER | LSENG_HTTP
|
||||||
GLOBAL_CLIENT = 1
|
GLOBAL_CLIENT = 1
|
||||||
GLOBAL_SERVER = 2
|
GLOBAL_SERVER = 2
|
||||||
MAJOR_VERSION = 2
|
MAJOR_VERSION = 2
|
||||||
MINOR_VERSION = 6
|
MINOR_VERSION = 18
|
||||||
PATCH_VERSION = 1
|
PATCH_VERSION = 1
|
||||||
EXPERIMENTAL_Q098 = 0
|
EXPERIMENTAL_Q098 = 0
|
||||||
DEPRECATED_VERSIONS = 0
|
DEPRECATED_VERSIONS = 0
|
||||||
MIN_CFW = 16 * 1024
|
|
||||||
DF_CFCW_SERVER = 3 * 1024 * 1024 / 2
|
|
||||||
DF_CFCW_CLIENT = 15 * 1024 * 1024
|
|
||||||
DF_SFCW_SERVER = 1 * 1024 * 1024
|
|
||||||
DF_SFCW_CLIENT = 6 * 1024 * 1024
|
|
||||||
DF_MAX_STREAMS_IN = 100
|
DF_MAX_STREAMS_IN = 100
|
||||||
DF_INIT_MAX_STREAM_DATA_BIDI_LOCAL_SERVER = 0
|
DF_INIT_MAX_STREAM_DATA_BIDI_LOCAL_SERVER = 0
|
||||||
DF_INIT_MAX_STREAM_DATA_BIDI_REMOTE_CLIENT = 0
|
DF_INIT_MAX_STREAM_DATA_BIDI_REMOTE_CLIENT = 0
|
||||||
DF_INIT_MAX_STREAMS_UNI_CLIENT = 100
|
DF_INIT_MAX_STREAMS_UNI_CLIENT = 100
|
||||||
DF_INIT_MAX_STREAMS_UNI_SERVER = 3
|
DF_INIT_MAX_STREAMS_UNI_SERVER = 3
|
||||||
DF_INIT_MAX_STREAM_DATA_UNI_CLIENT = 32 * 1024
|
DF_IDLE_TIMEOUT = 30
|
||||||
DF_INIT_MAX_STREAM_DATA_UNI_SERVER = 12 * 1024
|
DF_PING_PERIOD = 15
|
||||||
DF_IDLE_TIMEOUT = 30
|
DF_SILENT_CLOSE = 1
|
||||||
DF_PING_PERIOD = 15
|
DF_MAX_HEADER_LIST_SIZE = 0
|
||||||
DF_HANDSHAKE_TO = 10 * 1000 * 1000
|
|
||||||
DF_IDLE_CONN_TO = DF_IDLE_TIMEOUT * 1000 * 1000
|
|
||||||
DF_SILENT_CLOSE = 1
|
|
||||||
DF_MAX_HEADER_LIST_SIZE = 0
|
|
||||||
DF_UA = "LSQUIC"
|
DF_UA = "LSQUIC"
|
||||||
DF_STTL = 86400
|
DF_STTL = 86400
|
||||||
DF_MAX_INCHOATE = 1 * 1000 * 1000
|
DF_SUPPORT_NSTP = 0
|
||||||
DF_SUPPORT_SREJ_SERVER = 1
|
DF_SUPPORT_PUSH = 1
|
||||||
DF_SUPPORT_SREJ_CLIENT = 0
|
DF_SUPPORT_TCID0 = 1
|
||||||
DF_SUPPORT_NSTP = 0
|
DF_HONOR_PRST = 0
|
||||||
DF_SUPPORT_PUSH = 1
|
DF_SEND_PRST = 0
|
||||||
DF_SUPPORT_TCID0 = 1
|
DF_PROGRESS_CHECK = 1000
|
||||||
DF_HONOR_PRST = 0
|
DF_RW_ONCE = 0
|
||||||
DF_SEND_PRST = 0
|
DF_PROC_TIME_THRESH = 0
|
||||||
DF_PROGRESS_CHECK = 1000
|
DF_PACE_PACKETS = 1
|
||||||
DF_RW_ONCE = 0
|
DF_CLOCK_GRANULARITY = 1000
|
||||||
DF_PROC_TIME_THRESH = 0
|
DF_SCID_LEN = 8
|
||||||
DF_PACE_PACKETS = 1
|
DF_SCID_ISS_RATE = 60
|
||||||
DF_CLOCK_GRANULARITY = 1000
|
DF_QPACK_DEC_MAX_BLOCKED = 100
|
||||||
DF_SCID_LEN = 8
|
DF_QPACK_DEC_MAX_SIZE = 4096
|
||||||
DF_SCID_ISS_RATE = 60
|
DF_QPACK_ENC_MAX_BLOCKED = 100
|
||||||
DF_QPACK_DEC_MAX_BLOCKED = 100
|
DF_QPACK_ENC_MAX_SIZE = 4096
|
||||||
DF_QPACK_DEC_MAX_SIZE = 4096
|
DF_ECN = 0
|
||||||
DF_QPACK_ENC_MAX_BLOCKED = 100
|
DF_ALLOW_MIGRATION = 1
|
||||||
DF_QPACK_ENC_MAX_SIZE = 4096
|
DF_QL_BITS = 2
|
||||||
DF_ECN = 0
|
DF_SPIN = 1
|
||||||
DF_ALLOW_MIGRATION = 1
|
DF_DELAYED_ACKS = 0
|
||||||
DF_CC_ALGO = 2
|
DF_TIMESTAMPS = 1
|
||||||
|
DF_CC_ALGO = 1
|
||||||
|
DF_MAX_UDP_PAYLOAD_SIZE_RX = 0
|
||||||
|
DF_GREASE_QUIC_BIT = 1
|
||||||
|
DF_NOPROGRESS_TIMEOUT_SERVER = 60
|
||||||
|
DF_NOPROGRESS_TIMEOUT_CLIENT = 0
|
||||||
|
|
||||||
struct Cid
|
struct Cid
|
||||||
len : UintFast8T
|
len : UInt8
|
||||||
u_cid : CidUCid
|
u_cid : CidUCid
|
||||||
end
|
end
|
||||||
|
|
||||||
alias UintFast8T = UInt8
|
|
||||||
|
|
||||||
union CidUCid
|
union CidUCid
|
||||||
buf : LibC::UInt8T[20]
|
buf : LibC::UInt8T[20]
|
||||||
id : LibC::UInt64T
|
id : LibC::UInt64T
|
||||||
|
@ -80,7 +72,6 @@ lib LibLsquic
|
||||||
|
|
||||||
struct LsxpackHeader
|
struct LsxpackHeader
|
||||||
buf : LibC::Char*
|
buf : LibC::Char*
|
||||||
name_ptr : LibC::Char*
|
|
||||||
name_hash : LibC::UInt32T
|
name_hash : LibC::UInt32T
|
||||||
nameval_hash : LibC::UInt32T
|
nameval_hash : LibC::UInt32T
|
||||||
name_offset : LibC::UInt16T
|
name_offset : LibC::UInt16T
|
||||||
|
@ -261,10 +252,11 @@ lib LibLsquic
|
||||||
Lsqver043 = 0
|
Lsqver043 = 0
|
||||||
Lsqver046 = 1
|
Lsqver046 = 1
|
||||||
Lsqver050 = 2
|
Lsqver050 = 2
|
||||||
LsqverId25 = 3
|
LsqverId27 = 3
|
||||||
LsqverId27 = 4
|
LsqverId28 = 4
|
||||||
LsqverVerneg = 5
|
LsqverId29 = 5
|
||||||
NLsqver = 6
|
LsqverVerneg = 6
|
||||||
|
NLsqver = 7
|
||||||
end
|
end
|
||||||
|
|
||||||
fun engine_packet_in = lsquic_engine_packet_in(x0 : EngineT, packet_in_data : UInt8*, packet_in_size : LibC::SizeT, sa_local : Sockaddr*, sa_peer : Sockaddr*, peer_ctx : Void*, ecn : LibC::Int) : LibC::Int
|
fun engine_packet_in = lsquic_engine_packet_in(x0 : EngineT, packet_in_data : UInt8*, packet_in_size : LibC::SizeT, sa_local : Sockaddr*, sa_peer : Sockaddr*, peer_ctx : Void*, ecn : LibC::Int) : LibC::Int
|
||||||
|
@ -374,5 +366,5 @@ lib LibLsquic
|
||||||
LsconnStPeerGoingAway = 9
|
LsconnStPeerGoingAway = 9
|
||||||
end
|
end
|
||||||
|
|
||||||
$ver2str : LibC::Char*[6]
|
$lsquic_ver2str : LibC::Char*[7]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue