general: restructure package, move socks to proxy

This commit is contained in:
nadoo 2020-10-01 22:49:14 +08:00
parent bd358e4ae6
commit edfca215c5
47 changed files with 60 additions and 60 deletions

View File

@ -7,8 +7,8 @@ import (
"github.com/nadoo/conflag" "github.com/nadoo/conflag"
"github.com/nadoo/glider/common/log"
"github.com/nadoo/glider/dns" "github.com/nadoo/glider/dns"
"github.com/nadoo/glider/log"
"github.com/nadoo/glider/rule" "github.com/nadoo/glider/rule"
) )

View File

@ -4,7 +4,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
) )
// LongTTL is 50 years duration in seconds, used for none-expired items. // LongTTL is 50 years duration in seconds, used for none-expired items.

View File

@ -8,8 +8,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -7,8 +7,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -9,9 +9,9 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/nadoo/glider/common/log"
"github.com/nadoo/glider/dns" "github.com/nadoo/glider/dns"
"github.com/nadoo/glider/ipset" "github.com/nadoo/glider/ipset"
"github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
"github.com/nadoo/glider/rule" "github.com/nadoo/glider/rule"
"github.com/nadoo/glider/service" "github.com/nadoo/glider/service"

View File

@ -9,7 +9,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
) )
const ( const (

View File

@ -5,7 +5,7 @@ import (
"net" "net"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
) )
// Direct proxy. // Direct proxy.

View File

@ -6,8 +6,8 @@ import (
"net" "net"
"net/textproto" "net/textproto"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -11,7 +11,7 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -8,7 +8,7 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
) )
// Methods are http methods from rfc. // Methods are http methods from rfc.

View File

@ -9,8 +9,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -12,7 +12,7 @@ import (
kcp "github.com/xtaci/kcp-go/v5" kcp "github.com/xtaci/kcp-go/v5"
"golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/pbkdf2"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -5,7 +5,7 @@ import (
"net" "net"
"net/url" "net/url"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
"github.com/nadoo/glider/proxy/http" "github.com/nadoo/glider/proxy/http"
"github.com/nadoo/glider/proxy/socks5" "github.com/nadoo/glider/proxy/socks5"

View File

@ -7,7 +7,7 @@ import (
"io" "io"
"net" "net"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
) )
// HTTPObfs struct // HTTPObfs struct

View File

@ -6,7 +6,7 @@ import (
"net" "net"
"net/url" "net/url"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -18,7 +18,7 @@ import (
"net" "net"
"time" "time"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
) )
const ( const (

View File

@ -11,9 +11,9 @@ import (
"syscall" "syscall"
"unsafe" "unsafe"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/socks"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
"github.com/nadoo/glider/proxy/socks"
) )
const ( const (

View File

@ -11,8 +11,8 @@ import (
"net/url" "net/url"
"strconv" "strconv"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -4,9 +4,9 @@ import (
"errors" "errors"
"net" "net"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/common/socks" "github.com/nadoo/glider/proxy/socks"
) )
// PktConn . // PktConn .

View File

@ -19,10 +19,10 @@ import (
"sync" "sync"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/common/socks"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
"github.com/nadoo/glider/proxy/socks"
) )
// Version is socks5 version number. // Version is socks5 version number.

View File

@ -4,8 +4,8 @@ import (
"errors" "errors"
"net" "net"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/common/socks" "github.com/nadoo/glider/proxy/socks"
) )
// PktConn . // PktConn .

View File

@ -10,10 +10,10 @@ import (
"github.com/nadoo/go-shadowsocks2/core" "github.com/nadoo/go-shadowsocks2/core"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/common/socks"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
"github.com/nadoo/glider/proxy/socks"
) )
// SS is a base ss struct. // SS is a base ss struct.

View File

@ -9,7 +9,7 @@ import (
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -13,9 +13,9 @@ import (
ssrinfo "github.com/mzz2017/shadowsocksR/ssr" ssrinfo "github.com/mzz2017/shadowsocksR/ssr"
"github.com/mzz2017/shadowsocksR/streamCipher" "github.com/mzz2017/shadowsocksR/streamCipher"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/socks"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
"github.com/nadoo/glider/proxy/socks"
) )
func init() { func init() {

View File

@ -6,7 +6,7 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -7,7 +7,7 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -6,9 +6,9 @@ import (
"io" "io"
"net" "net"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/common/socks"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
"github.com/nadoo/glider/proxy/socks"
) )
// PktConn . // PktConn .

View File

@ -11,10 +11,10 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/common/socks"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
"github.com/nadoo/glider/proxy/socks"
) )
// Trojan is a base trojan struct // Trojan is a base trojan struct

View File

@ -8,7 +8,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -7,7 +7,7 @@ import (
"os" "os"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -8,7 +8,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -9,7 +9,7 @@ import (
"net" "net"
"strings" "strings"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -4,7 +4,7 @@ import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
) )
const ( const (

View File

@ -14,7 +14,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
"golang.org/x/crypto/chacha20poly1305" "golang.org/x/crypto/chacha20poly1305"
) )

View File

@ -9,7 +9,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
) )
// User of vmess client. // User of vmess client.

View File

@ -6,7 +6,7 @@ import (
"net/url" "net/url"
"strconv" "strconv"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -11,7 +11,7 @@ import (
"net/textproto" "net/textproto"
"strings" "strings"
"github.com/nadoo/glider/common/pool" "github.com/nadoo/glider/pool"
) )
var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11") var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11")

View File

@ -7,7 +7,7 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -8,7 +8,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -11,7 +11,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -5,7 +5,7 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/proxy" "github.com/nadoo/glider/proxy"
) )

View File

@ -10,7 +10,7 @@ import (
"github.com/insomniacslk/dhcp/dhcpv4/nclient4" "github.com/insomniacslk/dhcp/dhcpv4/nclient4"
"github.com/insomniacslk/dhcp/dhcpv4/server4" "github.com/insomniacslk/dhcp/dhcpv4/server4"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
"github.com/nadoo/glider/service" "github.com/nadoo/glider/service"
) )

View File

@ -3,7 +3,7 @@ package service
import ( import (
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/nadoo/glider/log"
) )
// Service is a server that can be run. // Service is a server that can be run.