style: fmt

This commit is contained in:
exfly
2019-08-10 11:15:25 +08:00
parent 5fcbeb60aa
commit b0d16d3b3d
43 changed files with 182 additions and 141 deletions

View File

@@ -2,14 +2,15 @@ package proxy
import (
"errors"
"net"
"net/http"
"sync"
"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/astaxie/beego/logs"
"net"
"net/http"
"sync"
)
type Service interface {

View File

@@ -3,13 +3,6 @@ package proxy
import (
"bufio"
"crypto/tls"
"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"
"github.com/astaxie/beego/logs"
"io"
"net"
"net/http"
@@ -19,6 +12,14 @@ import (
"strconv"
"strings"
"sync"
"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 {

View File

@@ -1,18 +1,19 @@
package proxy
import (
"net"
"net/http"
"net/url"
"sync"
"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/astaxie/beego"
"github.com/astaxie/beego/logs"
"github.com/pkg/errors"
"net"
"net/http"
"net/url"
"sync"
)
type HttpsServer struct {

View File

@@ -1,12 +1,13 @@
package proxy
import (
"github.com/cnlh/nps/lib/common"
"github.com/cnlh/nps/lib/pool"
"github.com/astaxie/beego/logs"
"net"
"strings"
"time"
"github.com/astaxie/beego/logs"
"github.com/cnlh/nps/lib/common"
"github.com/cnlh/nps/lib/pool"
)
type P2PServer struct {

View File

@@ -3,13 +3,14 @@ package proxy
import (
"encoding/binary"
"errors"
"github.com/cnlh/nps/lib/common"
"github.com/cnlh/nps/lib/conn"
"github.com/cnlh/nps/lib/file"
"github.com/astaxie/beego/logs"
"io"
"net"
"strconv"
"github.com/astaxie/beego/logs"
"github.com/cnlh/nps/lib/common"
"github.com/cnlh/nps/lib/conn"
"github.com/cnlh/nps/lib/file"
)
const (
@@ -273,4 +274,4 @@ func NewSock5ModeServer(bridge NetBridge, task *file.Tunnel) *Sock5ModeServer {
//close
func (s *Sock5ModeServer) Close() error {
return s.listener.Close()
}
}

View File

@@ -3,11 +3,12 @@
package proxy
import (
"github.com/cnlh/nps/lib/common"
"github.com/cnlh/nps/lib/conn"
"net"
"strconv"
"syscall"
"github.com/cnlh/nps/lib/common"
"github.com/cnlh/nps/lib/conn"
)
func HandleTrans(c *conn.Conn, s *TunnelModeServer) error {

View File

@@ -1,14 +1,15 @@
package proxy
import (
"net"
"strings"
"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/lib/pool"
"github.com/astaxie/beego/logs"
"net"
"strings"
)
type UdpModeServer struct {