Explorar o código

change package path

ffdfgdfg %!s(int64=5) %!d(string=hai) anos
pai
achega
6c7ac59626

+ 2 - 2
Dockerfile.npc

@@ -1,10 +1,10 @@
 FROM golang as builder
 FROM golang as builder
-WORKDIR /go/src/github.com/cnlh/nps
+WORKDIR /go/src/ehang.io/nps
 COPY . .
 COPY . .
 RUN go get -d -v ./... 
 RUN go get -d -v ./... 
 RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/npc/npc.go
 RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/npc/npc.go
 
 
 FROM scratch
 FROM scratch
-COPY --from=builder /go/src/github.com/cnlh/nps/npc /
+COPY --from=builder /go/src/ehang.io/nps/npc /
 VOLUME /conf
 VOLUME /conf
 ENTRYPOINT ["/npc"]
 ENTRYPOINT ["/npc"]

+ 3 - 3
Dockerfile.nps

@@ -1,11 +1,11 @@
 FROM golang as builder
 FROM golang as builder
-WORKDIR /go/src/github.com/cnlh/nps
+WORKDIR /go/src/ehang.io/nps
 COPY . .
 COPY . .
 RUN go get -d -v ./... 
 RUN go get -d -v ./... 
 RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/nps/nps.go
 RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/nps/nps.go
 
 
 FROM scratch
 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
 VOLUME /conf
 CMD ["/nps"]
 CMD ["/nps"]

+ 8 - 8
bridge/bridge.go

@@ -11,16 +11,16 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"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"
 	"github.com/astaxie/beego/logs"
 	"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 {
 type Client struct {

+ 4 - 4
build.android.sh

@@ -14,16 +14,16 @@ git checkout v1.2.0
 go install -v ./cmd/fyne
 go install -v ./cmd/fyne
 #fyne package -os android fyne.io/fyne/cmd/hello
 #fyne package -os android fyne.io/fyne/cmd/hello
 echo "fyne install success"
 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
 #go get -u fyne.io/fyne fyne.io/fyne/cmd/fyne
 rm cmd/npc/sdk.go
 rm cmd/npc/sdk.go
 #go get -u ./...
 #go get -u ./...
 #go mod tidy
 #go mod tidy
 #rm -rf /go/src/golang.org/x/mobile
 #rm -rf /go/src/golang.org/x/mobile
 echo "tidy success"
 echo "tidy success"
-cd /go/src/github.com/cnlh/nps
+cd /go/src/ehang.io/nps
 go mod vendor
 go mod vendor
 cd vendor
 cd vendor
 cp -R * /go/src
 cp -R * /go/src

+ 6 - 5
client/client.go

@@ -11,11 +11,11 @@ import (
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/logs"
 	"github.com/xtaci/kcp-go"
 	"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 {
 type TRPClient struct {
@@ -44,6 +44,7 @@ func NewRPClient(svraddr string, vKey string, bridgeConnType string, proxyUrl st
 
 
 var NowStatus int
 var NowStatus int
 var CloseClient bool
 var CloseClient bool
+
 //start
 //start
 func (s *TRPClient) Start() {
 func (s *TRPClient) Start() {
 	CloseClient = false
 	CloseClient = false

+ 5 - 5
client/control.go

@@ -19,12 +19,12 @@ import (
 	"strings"
 	"strings"
 	"time"
 	"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/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"
 	"github.com/xtaci/kcp-go"
 	"golang.org/x/net/proxy"
 	"golang.org/x/net/proxy"
 )
 )

+ 3 - 3
client/health.go

@@ -7,10 +7,10 @@ import (
 	"strings"
 	"strings"
 	"time"
 	"time"
 
 
+	"ehang.io/nps/lib/conn"
+	"ehang.io/nps/lib/file"
+	"ehang.io/nps/lib/sheap"
 	"github.com/astaxie/beego/logs"
 	"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"
 	"github.com/pkg/errors"
 )
 )
 
 

+ 7 - 7
client/local.go

@@ -8,14 +8,14 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"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/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"
 	"github.com/xtaci/kcp-go"
 )
 )
 
 

+ 1 - 1
client/register.go

@@ -5,7 +5,7 @@ import (
 	"log"
 	"log"
 	"os"
 	"os"
 
 
-	"github.com/cnlh/nps/lib/common"
+	"ehang.io/nps/lib/common"
 )
 )
 
 
 func RegisterLocalIp(server string, vKey string, tp string, proxyUrl string, hour int) {
 func RegisterLocalIp(server string, vKey string, tp string, proxyUrl string, hour int) {

+ 6 - 6
cmd/npc/npc.go

@@ -1,16 +1,16 @@
 package main
 package main
 
 
 import (
 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"
 	"flag"
 	"fmt"
 	"fmt"
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/logs"
 	"github.com/ccding/go-stun/stun"
 	"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"
 	"github.com/kardianos/service"
 	"os"
 	"os"
 	"runtime"
 	"runtime"

+ 3 - 3
cmd/npc/sdk.go

@@ -2,10 +2,10 @@ package main
 
 
 import (
 import (
 	"C"
 	"C"
+	"ehang.io/nps/client"
+	"ehang.io/nps/lib/common"
+	"ehang.io/nps/lib/version"
 	"github.com/astaxie/beego/logs"
 	"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
 var cl *client.TRPClient

+ 10 - 10
cmd/nps/nps.go

@@ -1,26 +1,26 @@
 package main
 package main
 
 
 import (
 import (
+	"ehang.io/nps/lib/install"
 	"flag"
 	"flag"
-	"github.com/cnlh/nps/lib/install"
 	"log"
 	"log"
 	"os"
 	"os"
 	"path/filepath"
 	"path/filepath"
 	"runtime"
 	"runtime"
 	"strings"
 	"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"
 	"github.com/astaxie/beego/logs"
 	"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"
 	"github.com/kardianos/service"
 )
 )
 
 

+ 1 - 1
go.mod

@@ -1,4 +1,4 @@
-module github.com/cnlh/nps
+module ehang.io/nps
 
 
 go 1.13
 go 1.13
 
 

+ 4 - 4
gui/npc/npc.go

@@ -1,16 +1,16 @@
 package main
 package main
 
 
 import (
 import (
+	"ehang.io/nps/client"
+	"ehang.io/nps/lib/common"
+	"ehang.io/nps/lib/daemon"
+	"ehang.io/nps/lib/version"
 	"fmt"
 	"fmt"
 	"fyne.io/fyne"
 	"fyne.io/fyne"
 	"fyne.io/fyne/app"
 	"fyne.io/fyne/app"
 	"fyne.io/fyne/layout"
 	"fyne.io/fyne/layout"
 	"fyne.io/fyne/widget"
 	"fyne.io/fyne/widget"
 	"github.com/astaxie/beego/logs"
 	"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"
 	"io/ioutil"
 	"os"
 	"os"
 	"path"
 	"path"

+ 1 - 1
lib/common/util.go

@@ -16,7 +16,7 @@ import (
 	"strings"
 	"strings"
 	"sync"
 	"sync"
 
 
-	"github.com/cnlh/nps/lib/crypt"
+	"ehang.io/nps/lib/crypt"
 )
 )
 
 
 //Get the corresponding IP address through domain name
 //Get the corresponding IP address through domain name

+ 3 - 3
lib/config/config.go

@@ -6,8 +6,8 @@ import (
 	"regexp"
 	"regexp"
 	"strings"
 	"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 {
 type CommonConfig struct {
@@ -241,7 +241,7 @@ func dealTunnel(s string) *file.Tunnel {
 			t.StripPre = item[1]
 			t.StripPre = item[1]
 		case "multi_account":
 		case "multi_account":
 			t.MultiAccount = &file.MultiAccount{}
 			t.MultiAccount = &file.MultiAccount{}
-			if common.FileExists(item[1]){
+			if common.FileExists(item[1]) {
 				if b, err := common.ReadAllFromFile(item[1]); err != nil {
 				if b, err := common.ReadAllFromFile(item[1]); err != nil {
 					panic(err)
 					panic(err)
 				} else {
 				} else {

+ 6 - 6
lib/conn/conn.go

@@ -3,11 +3,11 @@ package conn
 import (
 import (
 	"bufio"
 	"bufio"
 	"bytes"
 	"bytes"
+	"ehang.io/nps/lib/goroutine"
 	"encoding/binary"
 	"encoding/binary"
 	"encoding/json"
 	"encoding/json"
 	"errors"
 	"errors"
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/logs"
-	"github.com/cnlh/nps/lib/goroutine"
 	"io"
 	"io"
 	"net"
 	"net"
 	"net/http"
 	"net/http"
@@ -16,11 +16,11 @@ import (
 	"strings"
 	"strings"
 	"time"
 	"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"
 	"github.com/xtaci/kcp-go"
 )
 )
 
 

+ 1 - 1
lib/daemon/daemon.go

@@ -9,7 +9,7 @@ import (
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
 
 
-	"github.com/cnlh/nps/lib/common"
+	"ehang.io/nps/lib/common"
 )
 )
 
 
 func InitDaemon(f string, runPath string, pidPath string) {
 func InitDaemon(f string, runPath string, pidPath string) {

+ 1 - 1
lib/daemon/reload.go

@@ -8,8 +8,8 @@ import (
 	"path/filepath"
 	"path/filepath"
 	"syscall"
 	"syscall"
 
 
+	"ehang.io/nps/lib/common"
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego"
-	"github.com/cnlh/nps/lib/common"
 )
 )
 
 
 func init() {
 func init() {

+ 3 - 3
lib/file/db.go

@@ -9,9 +9,9 @@ import (
 	"strings"
 	"strings"
 	"sync"
 	"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 {
 type DbUtils struct {

+ 2 - 2
lib/file/file.go

@@ -9,8 +9,8 @@ import (
 	"sync"
 	"sync"
 	"sync/atomic"
 	"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 {
 func NewJsonDb(runPath string) *JsonDb {

+ 1 - 1
lib/file/obj.go

@@ -6,7 +6,7 @@ import (
 	"sync/atomic"
 	"sync/atomic"
 	"time"
 	"time"
 
 
-	"github.com/cnlh/nps/lib/rate"
+	"ehang.io/nps/lib/rate"
 	"github.com/pkg/errors"
 	"github.com/pkg/errors"
 )
 )
 
 

+ 2 - 2
lib/goroutine/pool.go

@@ -1,8 +1,8 @@
 package goroutine
 package goroutine
 
 
 import (
 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"
 	"github.com/panjf2000/ants/v2"
 	"io"
 	"io"
 	"net"
 	"net"

+ 2 - 2
lib/install/install.go

@@ -1,11 +1,11 @@
 package install
 package install
 
 
 import (
 import (
+	"ehang.io/nps/lib/common"
 	"encoding/json"
 	"encoding/json"
 	"errors"
 	"errors"
 	"fmt"
 	"fmt"
 	"github.com/c4milo/unpackit"
 	"github.com/c4milo/unpackit"
-	"github.com/cnlh/nps/lib/common"
 	"io"
 	"io"
 	"io/ioutil"
 	"io/ioutil"
 	"log"
 	"log"
@@ -50,7 +50,7 @@ func downloadLatest(bin string) string {
 	fmt.Println("the latest version is", version)
 	fmt.Println("the latest version is", version)
 	filename := runtime.GOOS + "_" + runtime.GOARCH + "_" + bin + ".tar.gz"
 	filename := runtime.GOOS + "_" + runtime.GOARCH + "_" + bin + ".tar.gz"
 	// download latest package
 	// 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)
 	fmt.Println("download package from ", downloadUrl)
 	resp, err := http.Get(downloadUrl)
 	resp, err := http.Get(downloadUrl)
 	if err != nil {
 	if err != nil {

+ 1 - 1
lib/mux/conn.go

@@ -1,9 +1,9 @@
 package mux
 package mux
 
 
 import (
 import (
+	"ehang.io/nps/lib/common"
 	"errors"
 	"errors"
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/logs"
-	"github.com/cnlh/nps/lib/common"
 	"io"
 	"io"
 	"math"
 	"math"
 	"net"
 	"net"

+ 1 - 1
lib/mux/mux.go

@@ -9,8 +9,8 @@ import (
 	"sync/atomic"
 	"sync/atomic"
 	"time"
 	"time"
 
 
+	"ehang.io/nps/lib/common"
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/logs"
-	"github.com/cnlh/nps/lib/common"
 )
 )
 
 
 type Mux struct {
 type Mux struct {

+ 2 - 2
lib/mux/mux_test.go

@@ -2,9 +2,9 @@ package mux
 
 
 import (
 import (
 	"bufio"
 	"bufio"
+	"ehang.io/nps/lib/common"
+	"ehang.io/nps/lib/goroutine"
 	"fmt"
 	"fmt"
-	"github.com/cnlh/nps/lib/common"
-	"github.com/cnlh/nps/lib/goroutine"
 	"io"
 	"io"
 	"log"
 	"log"
 	"net"
 	"net"

+ 1 - 1
lib/mux/pmux.go

@@ -12,8 +12,8 @@ import (
 	"strings"
 	"strings"
 	"time"
 	"time"
 
 
+	"ehang.io/nps/lib/common"
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/logs"
-	"github.com/cnlh/nps/lib/common"
 	"github.com/pkg/errors"
 	"github.com/pkg/errors"
 )
 )
 
 

+ 1 - 1
lib/mux/queue.go

@@ -1,8 +1,8 @@
 package mux
 package mux
 
 
 import (
 import (
+	"ehang.io/nps/lib/common"
 	"errors"
 	"errors"
-	"github.com/cnlh/nps/lib/common"
 	"io"
 	"io"
 	"math"
 	"math"
 	"runtime"
 	"runtime"

+ 1 - 1
server/connection/connection.go

@@ -5,9 +5,9 @@ import (
 	"os"
 	"os"
 	"strconv"
 	"strconv"
 
 
+	"ehang.io/nps/lib/mux"
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/logs"
-	"github.com/cnlh/nps/lib/mux"
 )
 )
 
 
 var pMux *mux.PortMux
 var pMux *mux.PortMux

+ 4 - 4
server/proxy/base.go

@@ -6,11 +6,11 @@ import (
 	"net/http"
 	"net/http"
 	"sync"
 	"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/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 {
 type Service interface {

+ 6 - 6
server/proxy/http.go

@@ -13,13 +13,13 @@ import (
 	"strings"
 	"strings"
 	"sync"
 	"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/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 {
 type httpServer struct {

+ 5 - 5
server/proxy/https.go

@@ -6,13 +6,13 @@ import (
 	"net/url"
 	"net/url"
 	"sync"
 	"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"
 	"github.com/astaxie/beego/logs"
 	"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"
 	"github.com/pkg/errors"
 )
 )
 
 

+ 1 - 1
server/proxy/p2p.go

@@ -5,8 +5,8 @@ import (
 	"strings"
 	"strings"
 	"time"
 	"time"
 
 
+	"ehang.io/nps/lib/common"
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/logs"
-	"github.com/cnlh/nps/lib/common"
 )
 )
 
 
 type P2PServer struct {
 type P2PServer struct {

+ 3 - 3
server/proxy/socks5.go

@@ -7,10 +7,10 @@ import (
 	"net"
 	"net"
 	"strconv"
 	"strconv"
 
 
+	"ehang.io/nps/lib/common"
+	"ehang.io/nps/lib/conn"
+	"ehang.io/nps/lib/file"
 	"github.com/astaxie/beego/logs"
 	"github.com/astaxie/beego/logs"
-	"github.com/cnlh/nps/lib/common"
-	"github.com/cnlh/nps/lib/conn"
-	"github.com/cnlh/nps/lib/file"
 )
 )
 
 
 const (
 const (

+ 5 - 5
server/proxy/tcp.go

@@ -7,13 +7,13 @@ import (
 	"path/filepath"
 	"path/filepath"
 	"strconv"
 	"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"
 	"github.com/astaxie/beego/logs"
 	"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 {
 type TunnelModeServer struct {

+ 2 - 2
server/proxy/transport.go

@@ -7,8 +7,8 @@ import (
 	"strconv"
 	"strconv"
 	"syscall"
 	"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 {
 func HandleTrans(c *conn.Conn, s *TunnelModeServer) error {

+ 1 - 1
server/proxy/transport_windows.go

@@ -3,7 +3,7 @@
 package proxy
 package proxy
 
 
 import (
 import (
-	"github.com/cnlh/nps/lib/conn"
+	"ehang.io/nps/lib/conn"
 )
 )
 
 
 func HandleTrans(c *conn.Conn, s *TunnelModeServer) error {
 func HandleTrans(c *conn.Conn, s *TunnelModeServer) error {

+ 4 - 4
server/proxy/udp.go

@@ -4,11 +4,11 @@ import (
 	"net"
 	"net"
 	"strings"
 	"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/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 {
 type UdpModeServer struct {

+ 6 - 6
server/server.go

@@ -1,21 +1,21 @@
 package server
 package server
 
 
 import (
 import (
+	"ehang.io/nps/lib/version"
 	"errors"
 	"errors"
-	"github.com/cnlh/nps/lib/version"
 	"math"
 	"math"
 	"os"
 	"os"
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
 	"time"
 	"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"
 	"github.com/astaxie/beego/logs"
 	"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/cpu"
 	"github.com/shirou/gopsutil/load"
 	"github.com/shirou/gopsutil/load"
 	"github.com/shirou/gopsutil/mem"
 	"github.com/shirou/gopsutil/mem"

+ 2 - 2
server/test/test.go

@@ -5,9 +5,9 @@ import (
 	"path/filepath"
 	"path/filepath"
 	"strconv"
 	"strconv"
 
 
+	"ehang.io/nps/lib/common"
+	"ehang.io/nps/lib/file"
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego"
-	"github.com/cnlh/nps/lib/common"
-	"github.com/cnlh/nps/lib/file"
 )
 )
 
 
 func TestServerConfig() {
 func TestServerConfig() {

+ 1 - 1
server/tool/utils.go

@@ -5,8 +5,8 @@ import (
 	"strconv"
 	"strconv"
 	"time"
 	"time"
 
 
+	"ehang.io/nps/lib/common"
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego"
-	"github.com/cnlh/nps/lib/common"
 	"github.com/shirou/gopsutil/cpu"
 	"github.com/shirou/gopsutil/cpu"
 	"github.com/shirou/gopsutil/load"
 	"github.com/shirou/gopsutil/load"
 	"github.com/shirou/gopsutil/mem"
 	"github.com/shirou/gopsutil/mem"

+ 1 - 1
web/controllers/auth.go

@@ -4,8 +4,8 @@ import (
 	"encoding/hex"
 	"encoding/hex"
 	"time"
 	"time"
 
 
+	"ehang.io/nps/lib/crypt"
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego"
-	"github.com/cnlh/nps/lib/crypt"
 )
 )
 
 
 type AuthController struct {
 type AuthController struct {

+ 4 - 4
web/controllers/base.go

@@ -7,11 +7,11 @@ import (
 	"strings"
 	"strings"
 	"time"
 	"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/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 {
 type BaseController struct {

+ 4 - 4
web/controllers/client.go

@@ -1,11 +1,11 @@
 package controllers
 package controllers
 
 
 import (
 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/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 {
 type ClientController struct {

+ 4 - 4
web/controllers/index.go

@@ -1,10 +1,10 @@
 package controllers
 package controllers
 
 
 import (
 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"
 	"github.com/astaxie/beego"
 )
 )
 
 

+ 3 - 3
web/controllers/login.go

@@ -6,10 +6,10 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"time"
 
 
+	"ehang.io/nps/lib/common"
+	"ehang.io/nps/lib/file"
+	"ehang.io/nps/server"
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego"
-	"github.com/cnlh/nps/lib/common"
-	"github.com/cnlh/nps/lib/file"
-	"github.com/cnlh/nps/server"
 )
 )
 
 
 type LoginController struct {
 type LoginController struct {

+ 1 - 1
web/routers/router.go

@@ -1,8 +1,8 @@
 package routers
 package routers
 
 
 import (
 import (
+	"ehang.io/nps/web/controllers"
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego"
-	"github.com/cnlh/nps/web/controllers"
 )
 )
 
 
 func Init() {
 func Init() {

+ 1 - 1
web/static/page/error.html

@@ -5,6 +5,6 @@
     <title>nps error</title>
     <title>nps error</title>
 </head>
 </head>
 <body>
 <body>
-404 not found,power by <a href="//github.com/cnlh/nps">nps</a>
+404 not found,power by <a href="//ehang.io/nps">nps</a>
 </body>
 </body>
 </html>
 </html>

+ 1 - 1
web/views/login/index.html

@@ -37,7 +37,7 @@
             </p>
             </p>
 
 
             <p>
             <p>
-                goto <a href="//github.com/cnlh/nps">nps</a>
+                goto <a href="//ehang.io/nps">nps</a>
             </p>
             </p>
             <div class="ibox-content">
             <div class="ibox-content">
                 <form class="m-t" onsubmit="return false">
                 <form class="m-t" onsubmit="return false">

+ 2 - 2
web/views/public/layout.html

@@ -105,7 +105,7 @@
                 <ul class="nav navbar-top-links navbar-right">
                 <ul class="nav navbar-top-links navbar-right">
                     <li>
                     <li>
                         <span class="m-r-sm text-muted welcome-message">Welcome to use <a
                         <span class="m-r-sm text-muted welcome-message">Welcome to use <a
-                                href="https://github.com/cnlh/nps">NPS</a></span>
+                                href="https://ehang.io/nps">NPS</a></span>
                     </li>
                     </li>
                     <li>
                     <li>
                         <a id="lang-en">English</a>
                         <a id="lang-en">English</a>
@@ -128,7 +128,7 @@
     {{.LayoutContent}}
     {{.LayoutContent}}
         <div class="footer">
         <div class="footer">
             <div class="pull-right">
             <div class="pull-right">
-                read more <strong><a href="https://github.com/cnlh/nps">go</a></strong>
+                read more <strong><a href="https://ehang.io/nps">go</a></strong>
             </div>
             </div>
             <div>
             <div>
                 <strong>Copyright</strong> nps &copy; 2018-2019
                 <strong>Copyright</strong> nps &copy; 2018-2019