2021-01-13 17:07:04 +00:00
|
|
|
package proxy
|
2020-04-12 01:51:41 +00:00
|
|
|
|
|
|
|
import (
|
2020-04-25 22:22:45 +00:00
|
|
|
"fmt"
|
2020-04-12 01:51:41 +00:00
|
|
|
)
|
|
|
|
|
2020-04-25 22:22:45 +00:00
|
|
|
type redirectionTarget struct {
|
2020-10-02 09:56:48 +00:00
|
|
|
IPAddress string
|
|
|
|
Port uint16
|
2020-04-12 01:51:41 +00:00
|
|
|
}
|
|
|
|
|
2020-04-25 22:22:45 +00:00
|
|
|
func (rt redirectionTarget) host() string {
|
2020-10-02 09:56:48 +00:00
|
|
|
return fmt.Sprintf("%s:%d", rt.IPAddress, rt.Port)
|
2020-04-12 01:51:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type httpProxyOptions struct {
|
2020-10-02 09:56:48 +00:00
|
|
|
Target redirectionTarget
|
2020-04-12 01:51:41 +00:00
|
|
|
}
|