From 6c7ac5962633a274c0f3e64112b2c68329a40d69 Mon Sep 17 00:00:00 2001 From: ffdfgdfg Date: Wed, 8 Jan 2020 21:57:14 +0800 Subject: [PATCH] change package path --- Dockerfile.npc | 4 ++-- Dockerfile.nps | 6 +++--- bridge/bridge.go | 16 ++++++++-------- build.android.sh | 8 ++++---- client/client.go | 11 ++++++----- client/control.go | 10 +++++----- client/health.go | 6 +++--- client/local.go | 14 +++++++------- client/register.go | 2 +- cmd/npc/npc.go | 12 ++++++------ cmd/npc/sdk.go | 6 +++--- cmd/nps/nps.go | 20 ++++++++++---------- go.mod | 2 +- gui/npc/npc.go | 8 ++++---- lib/common/util.go | 2 +- lib/config/config.go | 6 +++--- lib/conn/conn.go | 12 ++++++------ lib/daemon/daemon.go | 2 +- lib/daemon/reload.go | 2 +- lib/file/db.go | 6 +++--- lib/file/file.go | 4 ++-- lib/file/obj.go | 2 +- lib/goroutine/pool.go | 4 ++-- lib/install/install.go | 4 ++-- lib/mux/conn.go | 2 +- lib/mux/mux.go | 2 +- lib/mux/mux_test.go | 4 ++-- lib/mux/pmux.go | 2 +- lib/mux/queue.go | 2 +- server/connection/connection.go | 2 +- server/proxy/base.go | 8 ++++---- server/proxy/http.go | 12 ++++++------ server/proxy/https.go | 10 +++++----- server/proxy/p2p.go | 2 +- server/proxy/socks5.go | 6 +++--- server/proxy/tcp.go | 10 +++++----- server/proxy/transport.go | 4 ++-- server/proxy/transport_windows.go | 2 +- server/proxy/udp.go | 8 ++++---- server/server.go | 12 ++++++------ server/test/test.go | 4 ++-- server/tool/utils.go | 2 +- web/controllers/auth.go | 2 +- web/controllers/base.go | 8 ++++---- web/controllers/client.go | 8 ++++---- web/controllers/index.go | 8 ++++---- web/controllers/login.go | 6 +++--- web/routers/router.go | 2 +- web/static/page/error.html | 2 +- web/views/login/index.html | 2 +- web/views/public/layout.html | 4 ++-- 51 files changed, 153 insertions(+), 152 deletions(-) diff --git a/Dockerfile.npc b/Dockerfile.npc index ae6715a..2ef275e 100755 --- a/Dockerfile.npc +++ b/Dockerfile.npc @@ -1,10 +1,10 @@ FROM golang as builder -WORKDIR /go/src/github.com/cnlh/nps +WORKDIR /go/src/ehang.io/nps COPY . . RUN go get -d -v ./... RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/npc/npc.go FROM scratch -COPY --from=builder /go/src/github.com/cnlh/nps/npc / +COPY --from=builder /go/src/ehang.io/nps/npc / VOLUME /conf ENTRYPOINT ["/npc"] diff --git a/Dockerfile.nps b/Dockerfile.nps index 698ced9..faf02ba 100755 --- a/Dockerfile.nps +++ b/Dockerfile.nps @@ -1,11 +1,11 @@ FROM golang as builder -WORKDIR /go/src/github.com/cnlh/nps +WORKDIR /go/src/ehang.io/nps COPY . . RUN go get -d -v ./... RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/nps/nps.go FROM scratch -COPY --from=builder /go/src/github.com/cnlh/nps/nps / -COPY --from=builder /go/src/github.com/cnlh/nps/web /web +COPY --from=builder /go/src/ehang.io/nps/nps / +COPY --from=builder /go/src/ehang.io/nps/web /web VOLUME /conf CMD ["/nps"] diff --git a/bridge/bridge.go b/bridge/bridge.go index 7894b66..0827260 100755 --- a/bridge/bridge.go +++ b/bridge/bridge.go @@ -11,16 +11,16 @@ import ( "sync" "time" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/crypt" + "ehang.io/nps/lib/file" + "ehang.io/nps/lib/mux" + "ehang.io/nps/lib/version" + "ehang.io/nps/server/connection" + "ehang.io/nps/server/tool" "github.com/astaxie/beego" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/crypt" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/lib/mux" - "github.com/cnlh/nps/lib/version" - "github.com/cnlh/nps/server/connection" - "github.com/cnlh/nps/server/tool" ) type Client struct { diff --git a/build.android.sh b/build.android.sh index d9f8141..918a66a 100644 --- a/build.android.sh +++ b/build.android.sh @@ -14,16 +14,16 @@ git checkout v1.2.0 go install -v ./cmd/fyne #fyne package -os android fyne.io/fyne/cmd/hello echo "fyne install success" -mkdir -p /go/src/github.com/cnlh/nps -cp -R /app/* /go/src/github.com/cnlh/nps -cd /go/src/github.com/cnlh/nps +mkdir -p /go/src/ehang.io/nps +cp -R /app/* /go/src/ehang.io/nps +cd /go/src/ehang.io/nps #go get -u fyne.io/fyne fyne.io/fyne/cmd/fyne rm cmd/npc/sdk.go #go get -u ./... #go mod tidy #rm -rf /go/src/golang.org/x/mobile echo "tidy success" -cd /go/src/github.com/cnlh/nps +cd /go/src/ehang.io/nps go mod vendor cd vendor cp -R * /go/src diff --git a/client/client.go b/client/client.go index 7a6f1da..98c918d 100755 --- a/client/client.go +++ b/client/client.go @@ -11,11 +11,11 @@ import ( "github.com/astaxie/beego/logs" "github.com/xtaci/kcp-go" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/config" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/crypt" - "github.com/cnlh/nps/lib/mux" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/config" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/crypt" + "ehang.io/nps/lib/mux" ) type TRPClient struct { @@ -44,6 +44,7 @@ func NewRPClient(svraddr string, vKey string, bridgeConnType string, proxyUrl st var NowStatus int var CloseClient bool + //start func (s *TRPClient) Start() { CloseClient = false diff --git a/client/control.go b/client/control.go index d8b98f3..63bf7ea 100644 --- a/client/control.go +++ b/client/control.go @@ -19,12 +19,12 @@ import ( "strings" "time" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/config" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/crypt" + "ehang.io/nps/lib/version" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/config" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/crypt" - "github.com/cnlh/nps/lib/version" "github.com/xtaci/kcp-go" "golang.org/x/net/proxy" ) diff --git a/client/health.go b/client/health.go index e804cf9..2726c5b 100644 --- a/client/health.go +++ b/client/health.go @@ -7,10 +7,10 @@ import ( "strings" "time" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/file" + "ehang.io/nps/lib/sheap" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/lib/sheap" "github.com/pkg/errors" ) diff --git a/client/local.go b/client/local.go index 9c903f6..13dfb60 100644 --- a/client/local.go +++ b/client/local.go @@ -8,14 +8,14 @@ import ( "sync" "time" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/config" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/crypt" + "ehang.io/nps/lib/file" + "ehang.io/nps/lib/mux" + "ehang.io/nps/server/proxy" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/config" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/crypt" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/lib/mux" - "github.com/cnlh/nps/server/proxy" "github.com/xtaci/kcp-go" ) diff --git a/client/register.go b/client/register.go index c03fb3c..dda4445 100644 --- a/client/register.go +++ b/client/register.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/cnlh/nps/lib/common" + "ehang.io/nps/lib/common" ) func RegisterLocalIp(server string, vKey string, tp string, proxyUrl string, hour int) { diff --git a/cmd/npc/npc.go b/cmd/npc/npc.go index ea1a5ec..cb2efba 100644 --- a/cmd/npc/npc.go +++ b/cmd/npc/npc.go @@ -1,16 +1,16 @@ package main import ( + "ehang.io/nps/client" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/config" + "ehang.io/nps/lib/file" + "ehang.io/nps/lib/install" + "ehang.io/nps/lib/version" "flag" "fmt" "github.com/astaxie/beego/logs" "github.com/ccding/go-stun/stun" - "github.com/cnlh/nps/client" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/config" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/lib/install" - "github.com/cnlh/nps/lib/version" "github.com/kardianos/service" "os" "runtime" diff --git a/cmd/npc/sdk.go b/cmd/npc/sdk.go index b8cc38f..5d199a2 100644 --- a/cmd/npc/sdk.go +++ b/cmd/npc/sdk.go @@ -2,10 +2,10 @@ package main import ( "C" + "ehang.io/nps/client" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/version" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/client" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/version" ) var cl *client.TRPClient diff --git a/cmd/nps/nps.go b/cmd/nps/nps.go index 36141f0..18ea025 100644 --- a/cmd/nps/nps.go +++ b/cmd/nps/nps.go @@ -1,26 +1,26 @@ package main import ( + "ehang.io/nps/lib/install" "flag" - "github.com/cnlh/nps/lib/install" "log" "os" "path/filepath" "runtime" "strings" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/crypt" + "ehang.io/nps/lib/daemon" + "ehang.io/nps/lib/file" + "ehang.io/nps/lib/version" + "ehang.io/nps/server" + "ehang.io/nps/server/connection" + "ehang.io/nps/server/tool" "github.com/astaxie/beego" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/crypt" - "github.com/cnlh/nps/lib/daemon" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/lib/version" - "github.com/cnlh/nps/server" - "github.com/cnlh/nps/server/connection" - "github.com/cnlh/nps/server/tool" - "github.com/cnlh/nps/web/routers" + "ehang.io/nps/web/routers" "github.com/kardianos/service" ) diff --git a/go.mod b/go.mod index 141d73c..cad2acc 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/cnlh/nps +module ehang.io/nps go 1.13 diff --git a/gui/npc/npc.go b/gui/npc/npc.go index 0c55ed4..516a87a 100644 --- a/gui/npc/npc.go +++ b/gui/npc/npc.go @@ -1,16 +1,16 @@ package main import ( + "ehang.io/nps/client" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/daemon" + "ehang.io/nps/lib/version" "fmt" "fyne.io/fyne" "fyne.io/fyne/app" "fyne.io/fyne/layout" "fyne.io/fyne/widget" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/client" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/daemon" - "github.com/cnlh/nps/lib/version" "io/ioutil" "os" "path" diff --git a/lib/common/util.go b/lib/common/util.go index 1db0d27..71e604e 100755 --- a/lib/common/util.go +++ b/lib/common/util.go @@ -16,7 +16,7 @@ import ( "strings" "sync" - "github.com/cnlh/nps/lib/crypt" + "ehang.io/nps/lib/crypt" ) //Get the corresponding IP address through domain name diff --git a/lib/config/config.go b/lib/config/config.go index 96531e2..62e2d2b 100644 --- a/lib/config/config.go +++ b/lib/config/config.go @@ -6,8 +6,8 @@ import ( "regexp" "strings" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/file" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/file" ) type CommonConfig struct { @@ -241,7 +241,7 @@ func dealTunnel(s string) *file.Tunnel { t.StripPre = item[1] case "multi_account": t.MultiAccount = &file.MultiAccount{} - if common.FileExists(item[1]){ + if common.FileExists(item[1]) { if b, err := common.ReadAllFromFile(item[1]); err != nil { panic(err) } else { diff --git a/lib/conn/conn.go b/lib/conn/conn.go index db03c40..c1ca1b1 100755 --- a/lib/conn/conn.go +++ b/lib/conn/conn.go @@ -3,11 +3,11 @@ package conn import ( "bufio" "bytes" + "ehang.io/nps/lib/goroutine" "encoding/binary" "encoding/json" "errors" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/goroutine" "io" "net" "net/http" @@ -16,11 +16,11 @@ import ( "strings" "time" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/crypt" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/lib/mux" - "github.com/cnlh/nps/lib/rate" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/crypt" + "ehang.io/nps/lib/file" + "ehang.io/nps/lib/mux" + "ehang.io/nps/lib/rate" "github.com/xtaci/kcp-go" ) diff --git a/lib/daemon/daemon.go b/lib/daemon/daemon.go index 3c41086..521745c 100644 --- a/lib/daemon/daemon.go +++ b/lib/daemon/daemon.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - "github.com/cnlh/nps/lib/common" + "ehang.io/nps/lib/common" ) func InitDaemon(f string, runPath string, pidPath string) { diff --git a/lib/daemon/reload.go b/lib/daemon/reload.go index 2db00ac..5216eff 100644 --- a/lib/daemon/reload.go +++ b/lib/daemon/reload.go @@ -8,8 +8,8 @@ import ( "path/filepath" "syscall" + "ehang.io/nps/lib/common" "github.com/astaxie/beego" - "github.com/cnlh/nps/lib/common" ) func init() { diff --git a/lib/file/db.go b/lib/file/db.go index c48df2e..50be394 100644 --- a/lib/file/db.go +++ b/lib/file/db.go @@ -9,9 +9,9 @@ import ( "strings" "sync" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/crypt" - "github.com/cnlh/nps/lib/rate" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/crypt" + "ehang.io/nps/lib/rate" ) type DbUtils struct { diff --git a/lib/file/file.go b/lib/file/file.go index 63f3cb7..beab47f 100644 --- a/lib/file/file.go +++ b/lib/file/file.go @@ -9,8 +9,8 @@ import ( "sync" "sync/atomic" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/rate" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/rate" ) func NewJsonDb(runPath string) *JsonDb { diff --git a/lib/file/obj.go b/lib/file/obj.go index 36c783b..31f3e63 100644 --- a/lib/file/obj.go +++ b/lib/file/obj.go @@ -6,7 +6,7 @@ import ( "sync/atomic" "time" - "github.com/cnlh/nps/lib/rate" + "ehang.io/nps/lib/rate" "github.com/pkg/errors" ) diff --git a/lib/goroutine/pool.go b/lib/goroutine/pool.go index 287c711..ca91d6d 100644 --- a/lib/goroutine/pool.go +++ b/lib/goroutine/pool.go @@ -1,8 +1,8 @@ package goroutine import ( - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/file" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/file" "github.com/panjf2000/ants/v2" "io" "net" diff --git a/lib/install/install.go b/lib/install/install.go index 6156e3f..8973d0d 100644 --- a/lib/install/install.go +++ b/lib/install/install.go @@ -1,11 +1,11 @@ package install import ( + "ehang.io/nps/lib/common" "encoding/json" "errors" "fmt" "github.com/c4milo/unpackit" - "github.com/cnlh/nps/lib/common" "io" "io/ioutil" "log" @@ -50,7 +50,7 @@ func downloadLatest(bin string) string { fmt.Println("the latest version is", version) filename := runtime.GOOS + "_" + runtime.GOARCH + "_" + bin + ".tar.gz" // download latest package - downloadUrl := fmt.Sprintf("https://github.com/cnlh/nps/releases/download/%s/%s", version, filename) + downloadUrl := fmt.Sprintf("https://ehang.io/nps/releases/download/%s/%s", version, filename) fmt.Println("download package from ", downloadUrl) resp, err := http.Get(downloadUrl) if err != nil { diff --git a/lib/mux/conn.go b/lib/mux/conn.go index 85ba1ef..c0a5b7a 100644 --- a/lib/mux/conn.go +++ b/lib/mux/conn.go @@ -1,9 +1,9 @@ package mux import ( + "ehang.io/nps/lib/common" "errors" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/common" "io" "math" "net" diff --git a/lib/mux/mux.go b/lib/mux/mux.go index 52bd81c..5b591ed 100644 --- a/lib/mux/mux.go +++ b/lib/mux/mux.go @@ -9,8 +9,8 @@ import ( "sync/atomic" "time" + "ehang.io/nps/lib/common" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/common" ) type Mux struct { diff --git a/lib/mux/mux_test.go b/lib/mux/mux_test.go index 0d71ee4..a3ed3fc 100644 --- a/lib/mux/mux_test.go +++ b/lib/mux/mux_test.go @@ -2,9 +2,9 @@ package mux import ( "bufio" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/goroutine" "fmt" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/goroutine" "io" "log" "net" diff --git a/lib/mux/pmux.go b/lib/mux/pmux.go index f4e9d4a..b8de236 100644 --- a/lib/mux/pmux.go +++ b/lib/mux/pmux.go @@ -12,8 +12,8 @@ import ( "strings" "time" + "ehang.io/nps/lib/common" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/common" "github.com/pkg/errors" ) diff --git a/lib/mux/queue.go b/lib/mux/queue.go index 9a62fa2..cc80407 100644 --- a/lib/mux/queue.go +++ b/lib/mux/queue.go @@ -1,8 +1,8 @@ package mux import ( + "ehang.io/nps/lib/common" "errors" - "github.com/cnlh/nps/lib/common" "io" "math" "runtime" diff --git a/server/connection/connection.go b/server/connection/connection.go index dbd74ca..aac1c34 100644 --- a/server/connection/connection.go +++ b/server/connection/connection.go @@ -5,9 +5,9 @@ import ( "os" "strconv" + "ehang.io/nps/lib/mux" "github.com/astaxie/beego" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/mux" ) var pMux *mux.PortMux diff --git a/server/proxy/base.go b/server/proxy/base.go index 93774f3..7df5921 100644 --- a/server/proxy/base.go +++ b/server/proxy/base.go @@ -6,11 +6,11 @@ import ( "net/http" "sync" + "ehang.io/nps/bridge" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/file" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/bridge" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/file" ) type Service interface { diff --git a/server/proxy/http.go b/server/proxy/http.go index 936aae3..1470c3c 100644 --- a/server/proxy/http.go +++ b/server/proxy/http.go @@ -13,13 +13,13 @@ import ( "strings" "sync" + "ehang.io/nps/bridge" + "ehang.io/nps/lib/cache" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/file" + "ehang.io/nps/server/connection" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/bridge" - "github.com/cnlh/nps/lib/cache" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/server/connection" ) type httpServer struct { diff --git a/server/proxy/https.go b/server/proxy/https.go index 303b92d..3f0be1d 100644 --- a/server/proxy/https.go +++ b/server/proxy/https.go @@ -6,13 +6,13 @@ import ( "net/url" "sync" + "ehang.io/nps/lib/cache" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/crypt" + "ehang.io/nps/lib/file" "github.com/astaxie/beego" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/cache" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/crypt" - "github.com/cnlh/nps/lib/file" "github.com/pkg/errors" ) diff --git a/server/proxy/p2p.go b/server/proxy/p2p.go index b789ced..7c9b70f 100644 --- a/server/proxy/p2p.go +++ b/server/proxy/p2p.go @@ -5,8 +5,8 @@ import ( "strings" "time" + "ehang.io/nps/lib/common" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/common" ) type P2PServer struct { diff --git a/server/proxy/socks5.go b/server/proxy/socks5.go index dd27dfd..f2ee2d5 100755 --- a/server/proxy/socks5.go +++ b/server/proxy/socks5.go @@ -7,10 +7,10 @@ import ( "net" "strconv" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/file" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/file" ) const ( diff --git a/server/proxy/tcp.go b/server/proxy/tcp.go index 1f593ba..58ce3e0 100755 --- a/server/proxy/tcp.go +++ b/server/proxy/tcp.go @@ -7,13 +7,13 @@ import ( "path/filepath" "strconv" + "ehang.io/nps/bridge" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/file" + "ehang.io/nps/server/connection" "github.com/astaxie/beego" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/bridge" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/server/connection" ) type TunnelModeServer struct { diff --git a/server/proxy/transport.go b/server/proxy/transport.go index d622683..e08bfd0 100644 --- a/server/proxy/transport.go +++ b/server/proxy/transport.go @@ -7,8 +7,8 @@ import ( "strconv" "syscall" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/conn" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/conn" ) func HandleTrans(c *conn.Conn, s *TunnelModeServer) error { diff --git a/server/proxy/transport_windows.go b/server/proxy/transport_windows.go index cf4c22d..def673b 100644 --- a/server/proxy/transport_windows.go +++ b/server/proxy/transport_windows.go @@ -3,7 +3,7 @@ package proxy import ( - "github.com/cnlh/nps/lib/conn" + "ehang.io/nps/lib/conn" ) func HandleTrans(c *conn.Conn, s *TunnelModeServer) error { diff --git a/server/proxy/udp.go b/server/proxy/udp.go index 958e3c2..abe2c7f 100755 --- a/server/proxy/udp.go +++ b/server/proxy/udp.go @@ -4,11 +4,11 @@ import ( "net" "strings" + "ehang.io/nps/bridge" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/conn" + "ehang.io/nps/lib/file" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/bridge" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/conn" - "github.com/cnlh/nps/lib/file" ) type UdpModeServer struct { diff --git a/server/server.go b/server/server.go index 868a94d..b1de97e 100644 --- a/server/server.go +++ b/server/server.go @@ -1,21 +1,21 @@ package server import ( + "ehang.io/nps/lib/version" "errors" - "github.com/cnlh/nps/lib/version" "math" "os" "strconv" "strings" "time" + "ehang.io/nps/bridge" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/file" + "ehang.io/nps/server/proxy" + "ehang.io/nps/server/tool" "github.com/astaxie/beego" "github.com/astaxie/beego/logs" - "github.com/cnlh/nps/bridge" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/server/proxy" - "github.com/cnlh/nps/server/tool" "github.com/shirou/gopsutil/cpu" "github.com/shirou/gopsutil/load" "github.com/shirou/gopsutil/mem" diff --git a/server/test/test.go b/server/test/test.go index 0a8fbfd..a30d03d 100644 --- a/server/test/test.go +++ b/server/test/test.go @@ -5,9 +5,9 @@ import ( "path/filepath" "strconv" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/file" "github.com/astaxie/beego" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/file" ) func TestServerConfig() { diff --git a/server/tool/utils.go b/server/tool/utils.go index fb8fa55..09dfaf7 100644 --- a/server/tool/utils.go +++ b/server/tool/utils.go @@ -5,8 +5,8 @@ import ( "strconv" "time" + "ehang.io/nps/lib/common" "github.com/astaxie/beego" - "github.com/cnlh/nps/lib/common" "github.com/shirou/gopsutil/cpu" "github.com/shirou/gopsutil/load" "github.com/shirou/gopsutil/mem" diff --git a/web/controllers/auth.go b/web/controllers/auth.go index 3b6b4c5..9eb22ca 100644 --- a/web/controllers/auth.go +++ b/web/controllers/auth.go @@ -4,8 +4,8 @@ import ( "encoding/hex" "time" + "ehang.io/nps/lib/crypt" "github.com/astaxie/beego" - "github.com/cnlh/nps/lib/crypt" ) type AuthController struct { diff --git a/web/controllers/base.go b/web/controllers/base.go index 1ba5a07..426692f 100755 --- a/web/controllers/base.go +++ b/web/controllers/base.go @@ -7,11 +7,11 @@ import ( "strings" "time" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/crypt" + "ehang.io/nps/lib/file" + "ehang.io/nps/server" "github.com/astaxie/beego" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/crypt" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/server" ) type BaseController struct { diff --git a/web/controllers/client.go b/web/controllers/client.go index 8a3ae31..52bcee8 100644 --- a/web/controllers/client.go +++ b/web/controllers/client.go @@ -1,11 +1,11 @@ package controllers import ( + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/file" + "ehang.io/nps/lib/rate" + "ehang.io/nps/server" "github.com/astaxie/beego" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/lib/rate" - "github.com/cnlh/nps/server" ) type ClientController struct { diff --git a/web/controllers/index.go b/web/controllers/index.go index 5b60495..e28e49a 100755 --- a/web/controllers/index.go +++ b/web/controllers/index.go @@ -1,10 +1,10 @@ package controllers import ( - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/server" - "github.com/cnlh/nps/server/tool" - + "ehang.io/nps/lib/file" + "ehang.io/nps/server" + "ehang.io/nps/server/tool" + "github.com/astaxie/beego" ) diff --git a/web/controllers/login.go b/web/controllers/login.go index 39c5c55..5414325 100755 --- a/web/controllers/login.go +++ b/web/controllers/login.go @@ -6,10 +6,10 @@ import ( "sync" "time" + "ehang.io/nps/lib/common" + "ehang.io/nps/lib/file" + "ehang.io/nps/server" "github.com/astaxie/beego" - "github.com/cnlh/nps/lib/common" - "github.com/cnlh/nps/lib/file" - "github.com/cnlh/nps/server" ) type LoginController struct { diff --git a/web/routers/router.go b/web/routers/router.go index 31221eb..51ab97d 100755 --- a/web/routers/router.go +++ b/web/routers/router.go @@ -1,8 +1,8 @@ package routers import ( + "ehang.io/nps/web/controllers" "github.com/astaxie/beego" - "github.com/cnlh/nps/web/controllers" ) func Init() { diff --git a/web/static/page/error.html b/web/static/page/error.html index c063fc3..90f4cf4 100644 --- a/web/static/page/error.html +++ b/web/static/page/error.html @@ -5,6 +5,6 @@ nps error -404 not found,power by nps +404 not found,power by nps \ No newline at end of file diff --git a/web/views/login/index.html b/web/views/login/index.html index ffe89d0..fbe6488 100755 --- a/web/views/login/index.html +++ b/web/views/login/index.html @@ -37,7 +37,7 @@

- goto nps + goto nps

diff --git a/web/views/public/layout.html b/web/views/public/layout.html index a19cc62..04534f5 100755 --- a/web/views/public/layout.html +++ b/web/views/public/layout.html @@ -105,7 +105,7 @@