mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-02 08:26:59 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57c844fc35 | ||
|
|
1367f4c93e |
@@ -0,0 +1,26 @@
|
|||||||
|
name: Cleanup dangling container images
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- bulk-cleanup-ghcr
|
||||||
|
|
||||||
|
# Run the two cleanup workflows one at a time.
|
||||||
|
concurrency:
|
||||||
|
group: ghcr-images
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cleanup:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 120
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
# Untagged architecture manifests can still belong to a tagged image.
|
||||||
|
- name: Delete untagged and unreferenced versions
|
||||||
|
uses: dataaxiom/ghcr-cleanup-action@v1.2.2
|
||||||
|
with:
|
||||||
|
package: xray-core
|
||||||
|
delete-untagged: true
|
||||||
|
dry-run: true
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: Cleanup sha- container images
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- bulk-cleanup-ghcr
|
||||||
|
|
||||||
|
# Run the two cleanup workflows one at a time.
|
||||||
|
concurrency:
|
||||||
|
group: ghcr-images
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cleanup:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 120
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
# The repository needs Admin access under the package's Manage Actions access.
|
||||||
|
- name: Delete versions with only sha- tags
|
||||||
|
uses: dataaxiom/ghcr-cleanup-action@v1.2.2
|
||||||
|
with:
|
||||||
|
package: xray-core
|
||||||
|
use-regex: true
|
||||||
|
delete-tags: '^sha-'
|
||||||
|
# Preserve every non-sha- tag. The colon check avoids matching digests.
|
||||||
|
exclude-tags: '^(?!sha-)[^:]+$'
|
||||||
|
delete-untagged: false
|
||||||
|
dry-run: true
|
||||||
@@ -293,7 +293,6 @@ type SplitHTTPConfig struct {
|
|||||||
ServerMaxHeaderBytes int32 `json:"serverMaxHeaderBytes"`
|
ServerMaxHeaderBytes int32 `json:"serverMaxHeaderBytes"`
|
||||||
Xmux XmuxConfig `json:"xmux"`
|
Xmux XmuxConfig `json:"xmux"`
|
||||||
DownloadSettings *StreamConfig `json:"downloadSettings"`
|
DownloadSettings *StreamConfig `json:"downloadSettings"`
|
||||||
H2Params json.RawMessage `json:"h2Params"`
|
|
||||||
Extra json.RawMessage `json:"extra"`
|
Extra json.RawMessage `json:"extra"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,7 +495,6 @@ func (c *SplitHTTPConfig) Build() (proto.Message, error) {
|
|||||||
ServerMaxHeaderBytes: c.ServerMaxHeaderBytes,
|
ServerMaxHeaderBytes: c.ServerMaxHeaderBytes,
|
||||||
SessionIDTable: c.SessionIDTable,
|
SessionIDTable: c.SessionIDTable,
|
||||||
SessionIDLength: newRangeConfig(c.SessionIDLength),
|
SessionIDLength: newRangeConfig(c.SessionIDLength),
|
||||||
H2Params: c.H2Params,
|
|
||||||
Xmux: &splithttp.XmuxConfig{
|
Xmux: &splithttp.XmuxConfig{
|
||||||
MaxConcurrency: newRangeConfig(c.Xmux.MaxConcurrency),
|
MaxConcurrency: newRangeConfig(c.Xmux.MaxConcurrency),
|
||||||
MaxConnections: newRangeConfig(c.Xmux.MaxConnections),
|
MaxConnections: newRangeConfig(c.Xmux.MaxConnections),
|
||||||
|
|||||||
@@ -189,7 +189,6 @@ type Config struct {
|
|||||||
ServerMaxHeaderBytes int32 `protobuf:"varint,27,opt,name=serverMaxHeaderBytes,proto3" json:"serverMaxHeaderBytes,omitempty"`
|
ServerMaxHeaderBytes int32 `protobuf:"varint,27,opt,name=serverMaxHeaderBytes,proto3" json:"serverMaxHeaderBytes,omitempty"`
|
||||||
SessionIDTable string `protobuf:"bytes,28,opt,name=sessionIDTable,proto3" json:"sessionIDTable,omitempty"`
|
SessionIDTable string `protobuf:"bytes,28,opt,name=sessionIDTable,proto3" json:"sessionIDTable,omitempty"`
|
||||||
SessionIDLength *RangeConfig `protobuf:"bytes,29,opt,name=sessionIDLength,proto3" json:"sessionIDLength,omitempty"`
|
SessionIDLength *RangeConfig `protobuf:"bytes,29,opt,name=sessionIDLength,proto3" json:"sessionIDLength,omitempty"`
|
||||||
H2Params []byte `protobuf:"bytes,30,opt,name=h2Params,proto3" json:"h2Params,omitempty"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@@ -427,13 +426,6 @@ func (x *Config) GetSessionIDLength() *RangeConfig {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Config) GetH2Params() []byte {
|
|
||||||
if x != nil {
|
|
||||||
return x.H2Params
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var File_transport_internet_splithttp_config_proto protoreflect.FileDescriptor
|
var File_transport_internet_splithttp_config_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
const file_transport_internet_splithttp_config_proto_rawDesc = "" +
|
const file_transport_internet_splithttp_config_proto_rawDesc = "" +
|
||||||
@@ -449,7 +441,7 @@ const file_transport_internet_splithttp_config_proto_rawDesc = "" +
|
|||||||
"\x0ecMaxReuseTimes\x18\x03 \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x0ecMaxReuseTimes\x12Z\n" +
|
"\x0ecMaxReuseTimes\x18\x03 \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x0ecMaxReuseTimes\x12Z\n" +
|
||||||
"\x10hMaxRequestTimes\x18\x04 \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x10hMaxRequestTimes\x12Z\n" +
|
"\x10hMaxRequestTimes\x18\x04 \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x10hMaxRequestTimes\x12Z\n" +
|
||||||
"\x10hMaxReusableSecs\x18\x05 \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x10hMaxReusableSecs\x12*\n" +
|
"\x10hMaxReusableSecs\x18\x05 \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x10hMaxReusableSecs\x12*\n" +
|
||||||
"\x10hKeepAlivePeriod\x18\x06 \x01(\x03R\x10hKeepAlivePeriod\"\xe8\f\n" +
|
"\x10hKeepAlivePeriod\x18\x06 \x01(\x03R\x10hKeepAlivePeriod\"\xcc\f\n" +
|
||||||
"\x06Config\x12\x12\n" +
|
"\x06Config\x12\x12\n" +
|
||||||
"\x04host\x18\x01 \x01(\tR\x04host\x12\x12\n" +
|
"\x04host\x18\x01 \x01(\tR\x04host\x12\x12\n" +
|
||||||
"\x04path\x18\x02 \x01(\tR\x04path\x12\x12\n" +
|
"\x04path\x18\x02 \x01(\tR\x04path\x12\x12\n" +
|
||||||
@@ -480,8 +472,7 @@ const file_transport_internet_splithttp_config_proto_rawDesc = "" +
|
|||||||
"\x0fuplinkChunkSize\x18\x1a \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x0fuplinkChunkSize\x122\n" +
|
"\x0fuplinkChunkSize\x18\x1a \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x0fuplinkChunkSize\x122\n" +
|
||||||
"\x14serverMaxHeaderBytes\x18\x1b \x01(\x05R\x14serverMaxHeaderBytes\x12&\n" +
|
"\x14serverMaxHeaderBytes\x18\x1b \x01(\x05R\x14serverMaxHeaderBytes\x12&\n" +
|
||||||
"\x0esessionIDTable\x18\x1c \x01(\tR\x0esessionIDTable\x12X\n" +
|
"\x0esessionIDTable\x18\x1c \x01(\tR\x0esessionIDTable\x12X\n" +
|
||||||
"\x0fsessionIDLength\x18\x1d \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x0fsessionIDLength\x12\x1a\n" +
|
"\x0fsessionIDLength\x18\x1d \x01(\v2..xray.transport.internet.splithttp.RangeConfigR\x0fsessionIDLength\x1a:\n" +
|
||||||
"\bh2Params\x18\x1e \x01(\fR\bh2Params\x1a:\n" +
|
|
||||||
"\fHeadersEntry\x12\x10\n" +
|
"\fHeadersEntry\x12\x10\n" +
|
||||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x85\x01\n" +
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x85\x01\n" +
|
||||||
|
|||||||
@@ -52,5 +52,4 @@ message Config {
|
|||||||
int32 serverMaxHeaderBytes = 27;
|
int32 serverMaxHeaderBytes = 27;
|
||||||
string sessionIDTable = 28;
|
string sessionIDTable = 28;
|
||||||
RangeConfig sessionIDLength = 29;
|
RangeConfig sessionIDLength = 29;
|
||||||
bytes h2Params = 30;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import (
|
|||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
gotls "crypto/tls"
|
gotls "crypto/tls"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -554,14 +553,6 @@ func ListenXH(ctx context.Context, address net.Address, port net.Port, streamSet
|
|||||||
|
|
||||||
handler.localAddr = l.listener.Addr()
|
handler.localAddr = l.listener.Addr()
|
||||||
|
|
||||||
var http2Config *http.HTTP2Config
|
|
||||||
if len(l.config.H2Params) > 0 {
|
|
||||||
http2Config = new(http.HTTP2Config)
|
|
||||||
if err := json.Unmarshal(l.config.H2Params, http2Config); err != nil {
|
|
||||||
return nil, errors.New("failed to parse HTTP2Config").Base(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// server can handle both plaintext HTTP/1.1 and h2c
|
// server can handle both plaintext HTTP/1.1 and h2c
|
||||||
protocols := new(http.Protocols)
|
protocols := new(http.Protocols)
|
||||||
protocols.SetHTTP1(true)
|
protocols.SetHTTP1(true)
|
||||||
@@ -571,7 +562,6 @@ func ListenXH(ctx context.Context, address net.Address, port net.Port, streamSet
|
|||||||
ReadHeaderTimeout: time.Second * 4,
|
ReadHeaderTimeout: time.Second * 4,
|
||||||
MaxHeaderBytes: l.config.GetNormalizedServerMaxHeaderBytes(),
|
MaxHeaderBytes: l.config.GetNormalizedServerMaxHeaderBytes(),
|
||||||
Protocols: protocols,
|
Protocols: protocols,
|
||||||
HTTP2: http2Config,
|
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
if err := l.server.Serve(l.listener); err != nil {
|
if err := l.server.Serve(l.listener); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user