Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #106 #109

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,15 @@ vendor
.DS_Store
*.tar.gz
*.tar.bz2
.history
.vscode
go.sum

MITM

# pidfile
*.pid

# binary
gsnova

Empty file modified common/channel/dial.go
100755 → 100644
Empty file.
Empty file modified common/channel/http/local.go
100755 → 100644
Empty file.
Empty file modified common/channel/http/remote.go
100755 → 100644
Empty file.
Empty file modified common/channel/http2/local.go
100755 → 100644
Empty file.
Empty file modified common/channel/http2/remote.go
100755 → 100644
Empty file.
Empty file modified common/channel/kcp/local.go
100755 → 100644
Empty file.
Empty file modified common/channel/kcp/remote.go
100755 → 100644
Empty file.
Empty file modified common/channel/quic/local.go
100755 → 100644
Empty file.
3 changes: 2 additions & 1 deletion common/channel/quic/remote.go
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package quic

import (
"context"
"crypto/tls"

quic "github.com/lucas-clemente/quic-go"
Expand All @@ -11,7 +12,7 @@ import (

func servQUIC(lp quic.Listener) {
for {
sess, err := lp.Accept()
sess, err := lp.Accept(context.Background())
if nil != err {
continue
}
Expand Down
Empty file modified common/channel/tcp/local.go
100755 → 100644
Empty file.
Empty file modified common/channel/tcp/remote.go
100755 → 100644
Empty file.
Empty file modified common/channel/websocket/local.go
100755 → 100644
Empty file.
Empty file modified common/channel/websocket/remote.go
100755 → 100644
Empty file.
Empty file modified common/helper/chan.go
100755 → 100644
Empty file.
Empty file modified common/helper/sni.go
100755 → 100644
Empty file.
Empty file modified common/logger/ansi_color.go
100755 → 100644
Empty file.
Empty file modified common/logger/color_console_posix.go
100755 → 100644
Empty file.
Empty file modified common/logger/color_console_windows.go
100755 → 100644
Empty file.
Empty file modified common/mux/const.go
100755 → 100644
Empty file.
Empty file modified common/mux/http2.go
100755 → 100644
Empty file.
Empty file modified common/mux/mux.go
100755 → 100644
Empty file.
Empty file modified common/mux/mux_test.go
100755 → 100644
Empty file.
7 changes: 4 additions & 3 deletions common/mux/quic.go
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package mux

import (
"context"
"net"
"sync/atomic"
"time"
Expand All @@ -23,7 +24,7 @@ func (q *QUICMuxSession) CloseStream(stream MuxStream) error {
}

func (q *QUICMuxSession) OpenStream() (MuxStream, error) {
s, err := q.OpenStreamSync()
s, err := q.OpenStreamSync(context.Background())
if nil != err {
return nil, err
}
Expand All @@ -32,7 +33,7 @@ func (q *QUICMuxSession) OpenStream() (MuxStream, error) {
}

func (q *QUICMuxSession) AcceptStream() (MuxStream, error) {
s, err := q.Session.AcceptStream()
s, err := q.Session.AcceptStream(context.Background())
if nil != err {
return nil, err
}
Expand All @@ -45,7 +46,7 @@ func (q *QUICMuxSession) NumStreams() int {

func (q *QUICMuxSession) Close() error {
q.streamCounter = 0
return q.Session.Close()
return q.Session.CloseWithError(0, "")
}
func (s *QUICMuxSession) RemoteAddr() net.Addr {
return nil
Expand Down
Empty file modified common/mux/ws.go
100755 → 100644
Empty file.
36 changes: 36 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module gsnova

go 1.15

require (
github.com/NebulousLabs/go-upnp v0.0.0-20181203152547-b32978b8ccbf
github.com/boltdb/bolt v1.3.1 // indirect
github.com/dsnet/compress v0.0.1
github.com/fsnotify/fsnotify v1.4.9
github.com/golang/snappy v0.0.2
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c
github.com/google/easypki v1.1.0
github.com/gorilla/websocket v1.4.2
github.com/juju/ratelimit v1.0.1
github.com/klauspost/reedsolomon v1.9.11 // indirect
github.com/lucas-clemente/quic-go v0.19.3
github.com/miekg/dns v1.1.38
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect
github.com/tjfoc/gmsm v1.4.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible
github.com/xtaci/kcp-go v5.4.20+incompatible
github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37 // indirect
github.com/yinqiwen/fdns v0.0.0-20171017112320-12371043eaab
github.com/yinqiwen/gotoolkit v0.0.0-20200524133648-3980351e079f
github.com/yinqiwen/gsnova v0.0.0
github.com/yinqiwen/pmux v0.0.0-20180811072835-da2f176b9f7a
gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 // indirect
gitlab.com/NebulousLabs/go-upnp v0.0.0-20181011194642-3a71999ed0d3 // indirect
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/net v0.0.0-20210119194325-5f4716e94777
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324
)

replace github.com/yinqiwen/gsnova v0.0.0 => ./
Empty file modified local/transparent_other.go
100755 → 100644
Empty file.
Empty file modified local/transparent_unix.go
100755 → 100644
Empty file.
Empty file modified main.go
100755 → 100644
Empty file.
Empty file modified remote/proxy.go
100755 → 100644
Empty file.
Empty file modified remote/web.go
100755 → 100644
Empty file.