Signed-off-by: arraykeys@gmail.com <arraykeys@gmail.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
proxy更新日志
|
||||
v4.9
|
||||
1.修复了HTTP Basic代理返回不合适的头部,导致浏览器不会弹框,个别代理插件无法认证的问题.
|
||||
2.mux内网穿透切换smux到yamux.
|
||||
2.内网穿透切换smux到yamux.
|
||||
|
||||
|
||||
v4.8
|
||||
|
||||
@ -5,12 +5,14 @@ import (
|
||||
"fmt"
|
||||
logger "log"
|
||||
"net"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/snail007/goproxy/utils"
|
||||
|
||||
"github.com/xtaci/smux"
|
||||
//"github.com/xtaci/smux"
|
||||
smux "github.com/hashicorp/yamux"
|
||||
)
|
||||
|
||||
type ServerConn struct {
|
||||
@ -89,10 +91,12 @@ func (s *TunnelBridge) callback(inConn net.Conn) {
|
||||
var err error
|
||||
//s.log.Printf("connection from %s ", inConn.RemoteAddr())
|
||||
sess, err := smux.Server(inConn, &smux.Config{
|
||||
KeepAliveInterval: 10 * time.Second,
|
||||
KeepAliveTimeout: time.Duration(*s.cfg.Timeout) * time.Second,
|
||||
MaxFrameSize: 4096,
|
||||
MaxReceiveBuffer: 4194304,
|
||||
AcceptBacklog: 256,
|
||||
EnableKeepAlive: true,
|
||||
KeepAliveInterval: 9 * time.Second,
|
||||
ConnectionWriteTimeout: 3 * time.Second,
|
||||
MaxStreamWindowSize: 512 * 1024,
|
||||
LogOutput: os.Stderr,
|
||||
})
|
||||
if err != nil {
|
||||
s.log.Printf("new mux server conn error,ERR:%s", err)
|
||||
|
||||
@ -6,11 +6,13 @@ import (
|
||||
"io"
|
||||
logger "log"
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/snail007/goproxy/utils"
|
||||
|
||||
"github.com/xtaci/smux"
|
||||
//"github.com/xtaci/smux"
|
||||
smux "github.com/hashicorp/yamux"
|
||||
)
|
||||
|
||||
type TunnelClient struct {
|
||||
@ -139,10 +141,12 @@ func (s *TunnelClient) GetConn() (conn net.Conn, err error) {
|
||||
if err == nil {
|
||||
conn = net.Conn(&_conn)
|
||||
c, e := smux.Client(conn, &smux.Config{
|
||||
KeepAliveInterval: 10 * time.Second,
|
||||
KeepAliveTimeout: time.Duration(*s.cfg.Timeout) * time.Second,
|
||||
MaxFrameSize: 4096,
|
||||
MaxReceiveBuffer: 4194304,
|
||||
AcceptBacklog: 256,
|
||||
EnableKeepAlive: true,
|
||||
KeepAliveInterval: 9 * time.Second,
|
||||
ConnectionWriteTimeout: 3 * time.Second,
|
||||
MaxStreamWindowSize: 512 * 1024,
|
||||
LogOutput: os.Stderr,
|
||||
})
|
||||
if e != nil {
|
||||
s.log.Printf("new mux client conn error,ERR:%s", e)
|
||||
|
||||
@ -6,6 +6,7 @@ import (
|
||||
"io"
|
||||
logger "log"
|
||||
"net"
|
||||
"os"
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -13,7 +14,8 @@ import (
|
||||
|
||||
"github.com/snail007/goproxy/utils"
|
||||
|
||||
"github.com/xtaci/smux"
|
||||
//"github.com/xtaci/smux"
|
||||
smux "github.com/hashicorp/yamux"
|
||||
)
|
||||
|
||||
type TunnelServer struct {
|
||||
@ -288,10 +290,12 @@ func (s *TunnelServer) GetConn() (conn net.Conn, err error) {
|
||||
if err == nil {
|
||||
conn = net.Conn(&_conn)
|
||||
c, e := smux.Client(conn, &smux.Config{
|
||||
KeepAliveInterval: 10 * time.Second,
|
||||
KeepAliveTimeout: time.Duration(*s.cfg.Timeout) * time.Second,
|
||||
MaxFrameSize: 4096,
|
||||
MaxReceiveBuffer: 4194304,
|
||||
AcceptBacklog: 256,
|
||||
EnableKeepAlive: true,
|
||||
KeepAliveInterval: 9 * time.Second,
|
||||
ConnectionWriteTimeout: 3 * time.Second,
|
||||
MaxStreamWindowSize: 512 * 1024,
|
||||
LogOutput: os.Stderr,
|
||||
})
|
||||
if e != nil {
|
||||
s.log.Printf("new mux client conn error,ERR:%s", e)
|
||||
|
||||
Reference in New Issue
Block a user