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