0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-14 12:29:36 +03:00

Add httpupgrade test

This commit is contained in:
风扇滑翔翼
2024-06-05 17:39:55 +00:00
parent 9c6685d2ee
commit be29cc39d7
3 changed files with 157 additions and 4 deletions

View File

@ -100,7 +100,7 @@ func dialhttpUpgrade(ctx context.Context, dest net.Destination, streamSettings *
return connRF, nil
}
func dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (stat.Connection, error) {
func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (stat.Connection, error) {
newError("creating connection to ", dest).WriteToLog(session.ExportIDToError(ctx))
conn, err := dialhttpUpgrade(ctx, dest, streamSettings)
@ -111,5 +111,5 @@ func dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
}
func init() {
common.Must(internet.RegisterTransportDialer(protocolName, dial))
common.Must(internet.RegisterTransportDialer(protocolName, Dial))
}