mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-31 07:04:39 +00:00
refactor: reformat
This commit is contained in:
parent
195a68b26c
commit
b552e77cbe
@ -5,6 +5,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/babolivier/go-doh-client"
|
"github.com/babolivier/go-doh-client"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -22,7 +23,6 @@ func Lookup(domain string) (string, error) {
|
|||||||
return domain, nil
|
return domain, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
a, _, err := resolver.LookupA(domain)
|
a, _, err := resolver.LookupA(domain)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
@ -45,17 +45,17 @@ func (c *Conn) Write(b []byte) (n int, err error) {
|
|||||||
return c.conn.Write(b)
|
return c.conn.Write(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) SetReadDeadline(t time.Time) (error) {
|
func (c *Conn) SetReadDeadline(t time.Time) error {
|
||||||
c.conn.SetReadDeadline(t)
|
c.conn.SetReadDeadline(t)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) SetDeadLine(t time.Time) (error) {
|
func (c *Conn) SetDeadLine(t time.Time) error {
|
||||||
c.conn.SetDeadline(t)
|
c.conn.SetDeadline(t)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) SetKeepAlive(b bool) (error) {
|
func (c *Conn) SetKeepAlive(b bool) error {
|
||||||
c.conn.SetKeepAlive(b)
|
c.conn.SetKeepAlive(b)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@ type TCPAddr struct {
|
|||||||
Addr *net.TCPAddr
|
Addr *net.TCPAddr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TcpAddr(ip string, port int) *TCPAddr {
|
||||||
func TcpAddr(ip string, port int) (*TCPAddr) {
|
|
||||||
addr := &net.TCPAddr{
|
addr := &net.TCPAddr{
|
||||||
IP: net.ParseIP(ip),
|
IP: net.ParseIP(ip),
|
||||||
Port: port,
|
Port: port,
|
||||||
|
Loading…
Reference in New Issue
Block a user