feat: rename

This commit is contained in:
fuxuan 2019-11-24 13:02:22 +08:00
parent 50041c5e1b
commit 06cb8bbe38
40 changed files with 120 additions and 112 deletions

View File

@ -1,8 +1,8 @@
# [glider](https://github.com/nadoo/glider) # [glider](https://github.com/dongxinb/glider)
[![Go Report Card](https://goreportcard.com/badge/github.com/nadoo/glider)](https://goreportcard.com/report/github.com/nadoo/glider) [![Go Report Card](https://goreportcard.com/badge/github.com/dongxinb/glider)](https://goreportcard.com/report/github.com/dongxinb/glider)
[![GitHub release](https://img.shields.io/github/v/release/nadoo/glider.svg?include_prereleases)](https://github.com/nadoo/glider/releases) [![GitHub release](https://img.shields.io/github/v/release/dongxinb/glider.svg?include_prereleases)](https://github.com/dongxinb/glider/releases)
[![Actions Status](https://github.com/nadoo/glider/workflows/Build/badge.svg)](https://github.com/nadoo/glider/actions) [![Actions Status](https://github.com/dongxinb/glider/workflows/Build/badge.svg)](https://github.com/dongxinb/glider/actions)
glider is a forward proxy with multiple protocols support, and also a dns forwarding server with ipset management features(like dnsmasq). glider is a forward proxy with multiple protocols support, and also a dns forwarding server with ipset management features(like dnsmasq).
@ -79,12 +79,12 @@ TODO:
Binary: Binary:
- [https://github.com/nadoo/glider/releases](https://github.com/nadoo/glider/releases) - [https://github.com/dongxinb/glider/releases](https://github.com/dongxinb/glider/releases)
Go Get (requires **Go 1.13+** ): Go Get (requires **Go 1.13+** ):
```bash ```bash
go get -u github.com/nadoo/glider go get -u github.com/dongxinb/glider
``` ```
ArchLinux: ArchLinux:
@ -377,7 +377,7 @@ listen=tls://:443?cert=crtFilePath&key=keyFilePath,http://
## Service ## Service
- systemd: [https://github.com/nadoo/glider/blob/master/systemd/](https://github.com/nadoo/glider/blob/master/systemd/) - systemd: [https://github.com/dongxinb/glider/blob/master/systemd/](https://github.com/dongxinb/glider/blob/master/systemd/)
## Links ## Links

View File

@ -8,9 +8,9 @@ import (
"github.com/nadoo/conflag" "github.com/nadoo/conflag"
"github.com/nadoo/glider/dns" "github.com/dongxinb/glider/dns"
"github.com/nadoo/glider/rule" "github.com/dongxinb/glider/rule"
"github.com/nadoo/glider/strategy" "github.com/dongxinb/glider/strategy"
) )
var flag = conflag.New() var flag = conflag.New()

View File

@ -3,5 +3,5 @@
package main package main
import ( import (
_ "github.com/nadoo/glider/proxy/tproxy" _ "github.com/dongxinb/glider/proxy/tproxy"
) )

View File

@ -9,8 +9,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// HandleFunc function handles the dns TypeA or TypeAAAA answer. // HandleFunc function handles the dns TypeA or TypeAAAA answer.

View File

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

10
go.mod
View File

@ -4,11 +4,19 @@ go 1.13
require ( require (
github.com/dongxinb/go-shadowsocks2 v0.1.5 github.com/dongxinb/go-shadowsocks2 v0.1.5
github.com/klauspost/cpuid v1.2.1 // indirect
github.com/klauspost/reedsolomon v1.9.3 // indirect
github.com/nadoo/conflag v0.2.2 github.com/nadoo/conflag v0.2.2
github.com/nadoo/glider v0.9.2
github.com/nadoo/shadowsocksR v0.1.0 github.com/nadoo/shadowsocksR v0.1.0
github.com/pkg/errors v0.8.1 // indirect
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
github.com/templexxx/xor v0.0.0-20181023030647-4e92f724b73b // indirect
github.com/tjfoc/gmsm v1.0.1 // indirect
github.com/xtaci/kcp-go v5.4.11+incompatible github.com/xtaci/kcp-go v5.4.11+incompatible
github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae // indirect
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582 // indirect
golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 // indirect
) )
// Replace dependency modules with local developing copy // Replace dependency modules with local developing copy

4
go.sum
View File

@ -14,8 +14,8 @@ github.com/klauspost/reedsolomon v1.9.3 h1:N/VzgeMfHmLc+KHMD1UL/tNkfXAt8FnUqlgXG
github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4=
github.com/nadoo/conflag v0.2.2 h1:xywuyaevdBnA3+4g9S11ng+Nby725WN1LXargWnAXpM= github.com/nadoo/conflag v0.2.2 h1:xywuyaevdBnA3+4g9S11ng+Nby725WN1LXargWnAXpM=
github.com/nadoo/conflag v0.2.2/go.mod h1:dzFfDUpXdr2uS2oV+udpy5N2vfNOu/bFzjhX1WI52co= github.com/nadoo/conflag v0.2.2/go.mod h1:dzFfDUpXdr2uS2oV+udpy5N2vfNOu/bFzjhX1WI52co=
github.com/nadoo/glider v0.9.2 h1:zfgJLgB8p87MRhVjeCbiXmmF2ZbCMyS5HCSqrR83J4c= github.com/dongxinb/glider v0.9.2 h1:zfgJLgB8p87MRhVjeCbiXmmF2ZbCMyS5HCSqrR83J4c=
github.com/nadoo/glider v0.9.2/go.mod h1:S/94KRJFNtgoNlyEm4+33f/DrEsj/uxvismOW4FlIa0= github.com/dongxinb/glider v0.9.2/go.mod h1:S/94KRJFNtgoNlyEm4+33f/DrEsj/uxvismOW4FlIa0=
github.com/nadoo/go-shadowsocks2 v0.1.2 h1:+tCSt65YAAMf24wj3tqv6a9oVBcqSGFYVsifBZwT9w8= github.com/nadoo/go-shadowsocks2 v0.1.2 h1:+tCSt65YAAMf24wj3tqv6a9oVBcqSGFYVsifBZwT9w8=
github.com/nadoo/go-shadowsocks2 v0.1.2/go.mod h1:/E2kSkS0mqF/e79wcAA0PezoWXk4CY9HldJlzwWtbwU= github.com/nadoo/go-shadowsocks2 v0.1.2/go.mod h1:/E2kSkS0mqF/e79wcAA0PezoWXk4CY9HldJlzwWtbwU=
github.com/nadoo/shadowsocksR v0.1.0 h1:sYPxZi0l8F1nxDDcckzb0DHXxhe0LNW5iSeohqPw6Fg= github.com/nadoo/shadowsocksR v0.1.0 h1:sYPxZi0l8F1nxDDcckzb0DHXxhe0LNW5iSeohqPw6Fg=

View File

@ -14,8 +14,8 @@ import (
"syscall" "syscall"
"unsafe" "unsafe"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/rule" "github.com/dongxinb/glider/rule"
) )
// NFNL_SUBSYS_IPSET netfilter netlink message types // NFNL_SUBSYS_IPSET netfilter netlink message types

View File

@ -5,7 +5,7 @@ package ipset
import ( import (
"errors" "errors"
"github.com/nadoo/glider/rule" "github.com/dongxinb/glider/rule"
) )
// Manager struct // Manager struct

42
main.go
View File

@ -7,30 +7,30 @@ import (
"os/signal" "os/signal"
"syscall" "syscall"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/dns" "github.com/dongxinb/glider/dns"
"github.com/nadoo/glider/ipset" "github.com/dongxinb/glider/ipset"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
"github.com/nadoo/glider/rule" "github.com/dongxinb/glider/rule"
"github.com/nadoo/glider/strategy" "github.com/dongxinb/glider/strategy"
_ "github.com/nadoo/glider/proxy/http" _ "github.com/dongxinb/glider/proxy/http"
_ "github.com/nadoo/glider/proxy/kcp" _ "github.com/dongxinb/glider/proxy/kcp"
_ "github.com/nadoo/glider/proxy/mixed" _ "github.com/dongxinb/glider/proxy/mixed"
_ "github.com/nadoo/glider/proxy/obfs" _ "github.com/dongxinb/glider/proxy/obfs"
_ "github.com/nadoo/glider/proxy/reject" _ "github.com/dongxinb/glider/proxy/reject"
_ "github.com/nadoo/glider/proxy/socks5" _ "github.com/dongxinb/glider/proxy/socks5"
_ "github.com/nadoo/glider/proxy/ss" _ "github.com/dongxinb/glider/proxy/ss"
_ "github.com/nadoo/glider/proxy/ssr" _ "github.com/dongxinb/glider/proxy/ssr"
_ "github.com/nadoo/glider/proxy/tcptun" _ "github.com/dongxinb/glider/proxy/tcptun"
_ "github.com/nadoo/glider/proxy/tls" _ "github.com/dongxinb/glider/proxy/tls"
_ "github.com/nadoo/glider/proxy/udptun" _ "github.com/dongxinb/glider/proxy/udptun"
_ "github.com/nadoo/glider/proxy/uottun" _ "github.com/dongxinb/glider/proxy/uottun"
_ "github.com/nadoo/glider/proxy/vmess" _ "github.com/dongxinb/glider/proxy/vmess"
_ "github.com/nadoo/glider/proxy/ws" _ "github.com/dongxinb/glider/proxy/ws"
) )
var version = "0.9.2" var version = "0.9.3"
func main() { func main() {
// read configs // read configs

View File

@ -1,6 +1,6 @@
package main package main
import ( import (
_ "github.com/nadoo/glider/proxy/redir" _ "github.com/dongxinb/glider/proxy/redir"
_ "github.com/nadoo/glider/proxy/unix" _ "github.com/dongxinb/glider/proxy/unix"
) )

View File

@ -6,7 +6,7 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
) )
// Dialer is used to create connection. // Dialer is used to create connection.

View File

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

View File

@ -7,9 +7,9 @@ import (
"net" "net"
"net/textproto" "net/textproto"
"github.com/nadoo/glider/common/conn" "github.com/dongxinb/glider/common/conn"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// NewHTTPDialer returns a http proxy dialer. // NewHTTPDialer returns a http proxy dialer.

View File

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

View File

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

View File

@ -9,9 +9,9 @@ import (
"net/textproto" "net/textproto"
"time" "time"
"github.com/nadoo/glider/common/conn" "github.com/dongxinb/glider/common/conn"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// NewHTTPServer returns a http proxy server. // NewHTTPServer returns a http proxy server.

View File

@ -11,8 +11,8 @@ import (
kcp "github.com/xtaci/kcp-go" kcp "github.com/xtaci/kcp-go"
"golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/pbkdf2"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// KCP struct. // KCP struct.

View File

@ -5,11 +5,11 @@ import (
"net" "net"
"net/url" "net/url"
"github.com/nadoo/glider/common/conn" "github.com/dongxinb/glider/common/conn"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
"github.com/nadoo/glider/proxy/http" "github.com/dongxinb/glider/proxy/http"
"github.com/nadoo/glider/proxy/socks5" "github.com/dongxinb/glider/proxy/socks5"
) )
// Mixed struct. // Mixed struct.

View File

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

View File

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

View File

@ -5,7 +5,7 @@ import (
"errors" "errors"
"net" "net"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// A Reject represents the base struct of a reject proxy. // A Reject represents the base struct of a reject proxy.

View File

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

View File

@ -3,8 +3,8 @@ package socks5
import ( import (
"net" "net"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/common/socks" "github.com/dongxinb/glider/common/socks"
) )
// PktConn . // PktConn .

View File

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

View File

@ -3,7 +3,7 @@ package ss
import ( import (
"net" "net"
"github.com/nadoo/glider/common/socks" "github.com/dongxinb/glider/common/socks"
) )
// PktConn . // PktConn .

View File

@ -8,12 +8,12 @@ import (
"sync" "sync"
"time" "time"
"github.com/nadoo/go-shadowsocks2/core" "github.com/dongxinb/go-shadowsocks2/core"
"github.com/nadoo/glider/common/conn" "github.com/dongxinb/glider/common/conn"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/common/socks" "github.com/dongxinb/glider/common/socks"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// SS is a base ss struct. // SS is a base ss struct.

View File

@ -12,9 +12,9 @@ import (
"github.com/nadoo/shadowsocksR/protocol" "github.com/nadoo/shadowsocksR/protocol"
"github.com/nadoo/shadowsocksR/ssr" "github.com/nadoo/shadowsocksR/ssr"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/common/socks" "github.com/dongxinb/glider/common/socks"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// SSR struct. // SSR struct.

View File

@ -6,9 +6,9 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/nadoo/glider/common/conn" "github.com/dongxinb/glider/common/conn"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// TCPTun struct. // TCPTun struct.

View File

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

View File

@ -13,8 +13,8 @@ import (
"syscall" "syscall"
"unsafe" "unsafe"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// TProxy struct. // TProxy struct.

View File

@ -8,9 +8,9 @@ import (
"sync" "sync"
"time" "time"
"github.com/nadoo/glider/common/conn" "github.com/dongxinb/glider/common/conn"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// UDPTun is a base udptun struct. // UDPTun is a base udptun struct.

View File

@ -7,8 +7,8 @@ import (
"os" "os"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// Unix domain socket struct. // Unix domain socket struct.

View File

@ -8,9 +8,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/nadoo/glider/common/conn" "github.com/dongxinb/glider/common/conn"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// UoTTun is a base udp over tcp tunnel struct. // UoTTun is a base udp over tcp tunnel struct.

View File

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

View File

@ -7,8 +7,8 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// WS is the base ws proxy struct. // WS is the base ws proxy struct.

View File

@ -8,7 +8,7 @@ import (
"github.com/nadoo/conflag" "github.com/nadoo/conflag"
"github.com/nadoo/glider/strategy" "github.com/dongxinb/glider/strategy"
) )
// Config , every rule dialer points to a rule file // Config , every rule dialer points to a rule file

View File

@ -5,9 +5,9 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
"github.com/nadoo/glider/strategy" "github.com/dongxinb/glider/strategy"
) )
// Proxy struct // Proxy struct

View File

@ -7,8 +7,8 @@ import (
"strings" "strings"
"sync/atomic" "sync/atomic"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// StatusHandler function will be called when the forwarder's status changed // StatusHandler function will be called when the forwarder's status changed

View File

@ -11,8 +11,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/nadoo/glider/common/log" "github.com/dongxinb/glider/common/log"
"github.com/nadoo/glider/proxy" "github.com/dongxinb/glider/proxy"
) )
// Config is strategy config struct. // Config is strategy config struct.