Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
add dot and conjunction
Browse files Browse the repository at this point in the history
Signed-off-by: yuxiaobo <[email protected]>
  • Loading branch information
yuxiaobo96 committed Sep 23, 2019
1 parent 7745895 commit 4186e93
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dfdaemon/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func certPoolFromFiles(files ...string) (*x509.CertPool, error) {
return roots, nil
}

// Proxy describes a regular expression matching rule for how to proxy a request
// Proxy describes a regular expression matching rule for how to proxy a request.
type Proxy struct {
Regx *Regexp `yaml:"regx" json:"regx"`
UseHTTPS bool `yaml:"use_https" json:"use_https"`
Expand Down
4 changes: 2 additions & 2 deletions dfdaemon/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (proxy *Proxy) mirrorRegistry(w http.ResponseWriter, r *http.Request) {
}

// remoteConfig returns the tls.Config used to connect to the given remote host.
// If the host should not be hijacked, it will return nil.
// If the host should not be hijacked, and it will return nil.
func (proxy *Proxy) remoteConfig(host string) *tls.Config {
for _, h := range proxy.httpsHosts {
if h.Regx.MatchString(host) {
Expand All @@ -202,7 +202,7 @@ func (proxy *Proxy) remoteConfig(host string) *tls.Config {
return nil
}

// SetRules changes the rule lists of the proxy to the given rules
// SetRules changes the rule lists of the proxy to the given rules.
func (proxy *Proxy) SetRules(rules []*config.Proxy) error {
proxy.rules = rules
return nil
Expand Down
2 changes: 1 addition & 1 deletion dfdaemon/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Server struct {
// Option is the functional option for creating a server
type Option func(s *Server) error

// WithTLSFromFile sets the TLS config for the server from the given key pair file
// WithTLSFromFile sets the TLS config for the server from the given key pair file.
func WithTLSFromFile(certFile, keyFile string) Option {
return func(s *Server) error {
if s.server.TLSConfig == nil {
Expand Down
2 changes: 1 addition & 1 deletion dfdaemon/transport/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func New(opts ...Option) (*DFRoundTripper, error) {
// Option is functional config for DFRoundTripper
type Option func(rt *DFRoundTripper) error

// WithTLS configures TLS config used for http transport
// WithTLS configures TLS config used for http transport.
func WithTLS(cfg *tls.Config) Option {
return func(rt *DFRoundTripper) error {
rt.Round = defaultHTTPTransport(cfg)
Expand Down

0 comments on commit 4186e93

Please sign in to comment.