2017-07-26 18:56:24 +08:00
|
|
|
// +build !linux
|
2017-07-13 21:55:41 +08:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import "log"
|
|
|
|
|
2017-08-16 22:37:42 +08:00
|
|
|
type RedirProxy struct{ *proxy }
|
2017-07-13 21:55:41 +08:00
|
|
|
|
2017-08-16 22:37:42 +08:00
|
|
|
// NewRedirProxy returns a redirect proxy.
|
|
|
|
func NewRedirProxy(addr string, upProxy Proxy) (Proxy, error) {
|
|
|
|
return &RedirProxy{proxy: NewProxy(addr, upProxy)}, nil
|
2017-07-13 21:55:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// ListenAndServe redirected requests as a server.
|
2017-08-16 22:37:42 +08:00
|
|
|
func (s *RedirProxy) ListenAndServe() {
|
2017-08-07 15:06:26 +08:00
|
|
|
log.Fatal("redir not supported on this os")
|
2017-07-13 21:55:41 +08:00
|
|
|
}
|