mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-13 20:28:32 +10:00
Compare commits
27 Commits
v1.8.0-rc.
...
v1.8.0-rc.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45204e3926 | ||
|
|
4acc2c4af2 | ||
|
|
fcbcb9a0aa | ||
|
|
7a1aa8f75d | ||
|
|
7ed90384a1 | ||
|
|
ad93b8fba4 | ||
|
|
64ed8c0ff4 | ||
|
|
1239fb3725 | ||
|
|
85310c9f84 | ||
|
|
a4c318a2e9 | ||
|
|
52989e0683 | ||
|
|
9eca72004b | ||
|
|
52b1b66428 | ||
|
|
16679f2b87 | ||
|
|
b98bc1edb8 | ||
|
|
9f84e9e077 | ||
|
|
4fa0db4b3b | ||
|
|
2d905c3fae | ||
|
|
9e2da8503f | ||
|
|
0d6494efc5 | ||
|
|
cd0e594e96 | ||
|
|
5d17e20d20 | ||
|
|
4a7281daba | ||
|
|
6ba862e9d1 | ||
|
|
b7cdde5daf | ||
|
|
2dfee05e7b | ||
|
|
eff2270428 |
@@ -2,7 +2,7 @@
|
||||
icon: material/alert-decagram
|
||||
---
|
||||
|
||||
#### 1.8.0-rc.6
|
||||
#### 1.8.0-rc.5
|
||||
|
||||
* Fixes and improvements
|
||||
|
||||
|
||||
@@ -122,18 +122,14 @@ type ListenOptions struct {
|
||||
|
||||
type UDPTimeoutCompat Duration
|
||||
|
||||
func (c UDPTimeoutCompat) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal((time.Duration)(c).String())
|
||||
}
|
||||
|
||||
func (c *UDPTimeoutCompat) UnmarshalJSON(data []byte) error {
|
||||
func (u *UDPTimeoutCompat) UnmarshalJSON(data []byte) error {
|
||||
var valueNumber int64
|
||||
err := json.Unmarshal(data, &valueNumber)
|
||||
if err == nil {
|
||||
*c = UDPTimeoutCompat(time.Second * time.Duration(valueNumber))
|
||||
*u = UDPTimeoutCompat(time.Second * time.Duration(valueNumber))
|
||||
return nil
|
||||
}
|
||||
return json.Unmarshal(data, (*Duration)(c))
|
||||
return json.Unmarshal(data, (*Duration)(u))
|
||||
}
|
||||
|
||||
type ListenOptionsWrapper interface {
|
||||
|
||||
@@ -29,7 +29,7 @@ type Client struct {
|
||||
serverAddr M.Socksaddr
|
||||
transport http.RoundTripper
|
||||
http2 bool
|
||||
requestURL url.URL
|
||||
url *url.URL
|
||||
host []string
|
||||
method string
|
||||
headers http.Header
|
||||
@@ -81,7 +81,6 @@ func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, opt
|
||||
ctx: ctx,
|
||||
dialer: dialer,
|
||||
serverAddr: serverAddr,
|
||||
requestURL: requestURL,
|
||||
host: options.Host,
|
||||
method: options.Method,
|
||||
headers: options.Headers.Build(),
|
||||
@@ -106,7 +105,7 @@ func (c *Client) dialHTTP(ctx context.Context) (net.Conn, error) {
|
||||
|
||||
request := &http.Request{
|
||||
Method: c.method,
|
||||
URL: &c.requestURL,
|
||||
URL: c.url,
|
||||
Header: c.headers.Clone(),
|
||||
}
|
||||
switch hostLen := len(c.host); hostLen {
|
||||
@@ -126,7 +125,7 @@ func (c *Client) dialHTTP2(ctx context.Context) (net.Conn, error) {
|
||||
request := &http.Request{
|
||||
Method: c.method,
|
||||
Body: pipeInReader,
|
||||
URL: &c.requestURL,
|
||||
URL: c.url,
|
||||
Header: c.headers.Clone(),
|
||||
}
|
||||
request = request.WithContext(ctx)
|
||||
|
||||
Reference in New Issue
Block a user