mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00

2. rule: add dnsserver to ip rule map; 3. dns: add DNSAnswerHandler so we can define a custom handler when a domain resolved
22 lines
416 B
Go
22 lines
416 B
Go
// +build !linux
|
|
|
|
package main
|
|
|
|
import (
|
|
"errors"
|
|
"log"
|
|
)
|
|
|
|
// RedirProxy .
|
|
type RedirProxy struct{}
|
|
|
|
// NewRedirProxy returns a redirect proxy.
|
|
func NewRedirProxy(addr string, sDialer Dialer) (*RedirProxy, error) {
|
|
return nil, errors.New("redir not supported on this os")
|
|
}
|
|
|
|
// ListenAndServe redirected requests as a server.
|
|
func (s *RedirProxy) ListenAndServe() {
|
|
log.Fatal("redir not supported on this os")
|
|
}
|