added http url rewrite setting for forwarder node
This commit is contained in:
parent
04314fa084
commit
a06608ccaf
@ -1,6 +1,8 @@
|
|||||||
package chain
|
package chain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"regexp"
|
||||||
|
|
||||||
"github.com/go-gost/core/auth"
|
"github.com/go-gost/core/auth"
|
||||||
"github.com/go-gost/core/bypass"
|
"github.com/go-gost/core/bypass"
|
||||||
"github.com/go-gost/core/hosts"
|
"github.com/go-gost/core/hosts"
|
||||||
@ -9,10 +11,16 @@ import (
|
|||||||
"github.com/go-gost/core/selector"
|
"github.com/go-gost/core/selector"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type HTTPURLRewriteSetting struct {
|
||||||
|
Pattern *regexp.Regexp
|
||||||
|
Replacement string
|
||||||
|
}
|
||||||
|
|
||||||
type HTTPNodeSettings struct {
|
type HTTPNodeSettings struct {
|
||||||
Host string
|
Host string
|
||||||
Header map[string]string
|
Header map[string]string
|
||||||
Auther auth.Authenticator
|
Auther auth.Authenticator
|
||||||
|
Rewrite []HTTPURLRewriteSetting
|
||||||
}
|
}
|
||||||
|
|
||||||
type TLSNodeSettings struct {
|
type TLSNodeSettings struct {
|
||||||
@ -37,8 +45,6 @@ type NodeOptions struct {
|
|||||||
Path string
|
Path string
|
||||||
HTTP *HTTPNodeSettings
|
HTTP *HTTPNodeSettings
|
||||||
TLS *TLSNodeSettings
|
TLS *TLSNodeSettings
|
||||||
// DEPRECATED by HTTP.Auther
|
|
||||||
Auther auth.Authenticator
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type NodeOption func(*NodeOptions)
|
type NodeOption func(*NodeOptions)
|
||||||
|
Loading…
Reference in New Issue
Block a user