mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
server: changed interface definition and implementation
This commit is contained in:
1 parent
2813e80a98
commit
d37c2e2a35
14 files changed
+207
-240
No files matched your search
@@ -64,7 +64,7 @@ func NewRedir6Server(s string, dialer proxy.Dialer) (proxy.Server, error) {
|
||||
}
|
||||
|
||||
// ListenAndServe .
|
||||
func (s *RedirProxy) ListenAndServe(_ net.Conn) {
|
||||
func (s *RedirProxy) ListenAndServe() {
|
||||
l, err := net.Listen("tcp", s.addr)
|
||||
if err != nil {
|
||||
log.F("[redir] failed to listen on %s: %v", s.addr, err)
|
||||
@@ -114,6 +114,11 @@ func (s *RedirProxy) ListenAndServe(_ net.Conn) {
|
||||
}
|
||||
}
|
||||
|
||||
// Serve .
|
||||
func (s *RedirProxy) Serve(c net.Conn) {
|
||||
|
||||
}
|
||||
|
||||
// Get the original destination of a TCP connection.
|
||||
func getOrigDst(conn net.Conn, ipv6 bool) (socks.Addr, error) {
|
||||
c, ok := conn.(*net.TCPConn)
|
||||
|
||||
Reference in new issue
Block a user