change package path

This commit is contained in:
ffdfgdfg
2020-01-08 21:57:14 +08:00
parent 18938281c2
commit 6c7ac59626
51 changed files with 153 additions and 152 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -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"
)

View File

@@ -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) {

View File

@@ -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() {

View File

@@ -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 {

View File

@@ -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 {

View File

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

View File

@@ -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"

View File

@@ -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 {

View File

@@ -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"

View File

@@ -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 {

View File

@@ -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"

View File

@@ -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"
)

View File

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