2017-07-26 18:56:24 +08:00
|
|
|
// +build !linux
|
2017-07-13 21:55:41 +08:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import "log"
|
|
|
|
|
2017-08-07 15:06:26 +08:00
|
|
|
type redir struct{ *proxy }
|
2017-07-13 21:55:41 +08:00
|
|
|
|
|
|
|
// RedirProxy returns a redirect proxy.
|
|
|
|
func RedirProxy(addr string, upProxy Proxy) (Proxy, error) {
|
2017-08-07 15:06:26 +08:00
|
|
|
return &redir{proxy: newProxy(addr, upProxy)}, nil
|
2017-07-13 21:55:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// ListenAndServe redirected requests as a server.
|
|
|
|
func (s *redir) 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
|
|
|
}
|