From 25ca989b163f48593bc10430faa595fd2c49c88d Mon Sep 17 00:00:00 2001 From: kc Date: Mon, 15 Jul 2024 14:49:40 +0000 Subject: [PATCH 01/10] plumb url into structures needed for agent --- config/domain.go | 21 +++++++++++++++++++++ config/http.go | 4 ++++ config/tcp.go | 5 +++++ config/tls.go | 4 ++++ internal/tunnel/proto/msg.go | 3 +++ 5 files changed, 37 insertions(+) diff --git a/config/domain.go b/config/domain.go index a45018d9..01d9783a 100644 --- a/config/domain.go +++ b/config/domain.go @@ -1,5 +1,26 @@ package config +type urlOption string + +func WithURL(name string) interface { + HTTPEndpointOption + TLSEndpointOption +} { + return urlOption(name) +} + +func (opt urlOption) ApplyHTTP(opts *httpOptions) { + opts.URL = string(opt) +} + +func (opt urlOption) ApplyTLS(opts *tlsOptions) { + opts.URL = string(opt) +} + +func (opt urlOption) ApplyTCP(opts *tcpOptions) { + opts.URL = string(opt) +} + type domainOption string // WithDomain sets the fully-qualified domain name for this edge. diff --git a/config/http.go b/config/http.go index 24c2c0cb..b00421e6 100644 --- a/config/http.go +++ b/config/http.go @@ -38,6 +38,9 @@ type httpOptions struct { // Defaults to [SchemeHTTPS]. Scheme Scheme + // The URL to request for this endpoint + URL string + // The fqdn to request for this edge Domain string @@ -88,6 +91,7 @@ type httpOptions struct { func (cfg *httpOptions) toProtoConfig() *proto.HTTPEndpoint { opts := &proto.HTTPEndpoint{ + URL: cfg.URL, Domain: cfg.Domain, Hostname: cfg.Hostname, Subdomain: cfg.Subdomain, diff --git a/config/tcp.go b/config/tcp.go index aa4ee000..a199915e 100644 --- a/config/tcp.go +++ b/config/tcp.go @@ -32,6 +32,10 @@ func TCPEndpoint(opts ...TCPEndpointOption) Tunnel { type tcpOptions struct { // Common tunnel configuration options. commonOpts + + // The URL address to request for this endpoint. + URL string + // The TCP address to request for this edge. RemoteAddr string // An HTTP Server to run traffic on @@ -48,6 +52,7 @@ func WithRemoteAddr(addr string) TCPEndpointOption { func (cfg *tcpOptions) toProtoConfig() *proto.TCPEndpoint { return &proto.TCPEndpoint{ + URL: cfg.URL, Addr: cfg.RemoteAddr, IPRestriction: cfg.commonOpts.CIDRRestrictions.toProtoConfig(), ProxyProto: proto.ProxyProto(cfg.commonOpts.ProxyProto), diff --git a/config/tls.go b/config/tls.go index 2f8c8207..4ae7ecec 100644 --- a/config/tls.go +++ b/config/tls.go @@ -35,6 +35,9 @@ type tlsOptions struct { // Common tunnel options commonOpts + // The URL to request for this endpoint + URL string + // The fqdn to request for this edge. Domain string @@ -61,6 +64,7 @@ type tlsOptions struct { func (cfg *tlsOptions) toProtoConfig() *proto.TLSEndpoint { opts := &proto.TLSEndpoint{ + URL: cfg.URL, Domain: cfg.Domain, ProxyProto: proto.ProxyProto(cfg.ProxyProto), diff --git a/internal/tunnel/proto/msg.go b/internal/tunnel/proto/msg.go index 3a0710c3..e63fc7c3 100644 --- a/internal/tunnel/proto/msg.go +++ b/internal/tunnel/proto/msg.go @@ -282,6 +282,7 @@ func ParseProxyProto(proxyProto string) (ProxyProto, bool) { } type HTTPEndpoint struct { + URL string Domain string Hostname string // public hostname of the bind Subdomain string @@ -308,6 +309,7 @@ type HTTPEndpoint struct { } type TCPEndpoint struct { + URL string Addr string ProxyProto @@ -318,6 +320,7 @@ type TCPEndpoint struct { } type TLSEndpoint struct { + URL string Domain string Hostname string // public hostname of the bind Subdomain string From 44f2da94707b575dc8fd8fc6503b95c10c487531 Mon Sep 17 00:00:00 2001 From: kc Date: Wed, 17 Jul 2024 14:54:31 +0000 Subject: [PATCH 02/10] Keep incorrect println and fix elsewhere --- config/policy.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config/policy.go b/config/policy.go index 2e933600..21168158 100644 --- a/config/policy.go +++ b/config/policy.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" - "github.com/inconshreveable/log15" "gopkg.in/yaml.v3" po "golang.ngrok.com/ngrok/policy" @@ -78,8 +77,7 @@ func (p *policy) ApplyTCP(opts *tcpOptions) { // policyToString converts the policy into a JSON string representation. This is to help remap Policy to TrafficPolicy. func policyToString(p *policy) string { - logger := log15.New() - logger.Warn("WithPolicy has been deprecated. Please use WithPolicyString instead, as WithPolicy will stop working soon.") + fmt.Println("WithPolicy has been deprecated. Please use WithPolicyString instead, as WithPolicy will stop working soon.") val, err := json.Marshal(p) if err != nil { From bf547bd9be9bca96e83a2a0b0070acce52b24d18 Mon Sep 17 00:00:00 2001 From: kc Date: Wed, 17 Jul 2024 15:24:47 +0000 Subject: [PATCH 03/10] remove println which breaks json parsing --- config/policy.go | 3 ++- session.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/policy.go b/config/policy.go index 21168158..ba397cac 100644 --- a/config/policy.go +++ b/config/policy.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" + "github.com/inconshreveable/log15" "gopkg.in/yaml.v3" po "golang.ngrok.com/ngrok/policy" @@ -77,7 +78,7 @@ func (p *policy) ApplyTCP(opts *tcpOptions) { // policyToString converts the policy into a JSON string representation. This is to help remap Policy to TrafficPolicy. func policyToString(p *policy) string { - fmt.Println("WithPolicy has been deprecated. Please use WithPolicyString instead, as WithPolicy will stop working soon.") + log15.Root().Warn("WithPolicy has been deprecated. Please use WithPolicyString instead, as WithPolicy will stop working soon.") val, err := json.Marshal(p) if err != nil { diff --git a/session.go b/session.go index 9f527050..5688a9bc 100644 --- a/session.go +++ b/session.go @@ -920,7 +920,7 @@ func (s *sessionImpl) ListenAndServeHTTP(ctx context.Context, cfg config.Tunnel, impl.server = server } else { // Inform end user that they're using a deprecated option. - fmt.Println("Tunnel is serving an HTTP server via HTTP options. This has been deprecated. Please use Session.ListenAndServeHTTP instead.") + s.inner().Logger.Warn("Tunnel is serving an HTTP server via HTTP options. This has been deprecated. Please use Session.ListenAndServeHTTP instead.") } } From 7a7f835782951557fcf671902f43ceb0fc01aeee Mon Sep 17 00:00:00 2001 From: kc Date: Thu, 18 Jul 2024 14:38:44 +0000 Subject: [PATCH 04/10] add logging see what happens --- config/policy.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/config/policy.go b/config/policy.go index ba397cac..e0eec0cd 100644 --- a/config/policy.go +++ b/config/policy.go @@ -78,6 +78,25 @@ func (p *policy) ApplyTCP(opts *tcpOptions) { // policyToString converts the policy into a JSON string representation. This is to help remap Policy to TrafficPolicy. func policyToString(p *policy) string { + logger := log15.New() + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") + logger.Warn("WHAT") log15.Root().Warn("WithPolicy has been deprecated. Please use WithPolicyString instead, as WithPolicy will stop working soon.") val, err := json.Marshal(p) From 887e2f4ba1a7336153bb5fdfc9a9918ee084d1bf Mon Sep 17 00:00:00 2001 From: kc Date: Thu, 18 Jul 2024 15:22:45 +0000 Subject: [PATCH 05/10] Remove logger which still breaks json parsing, unblock myself and we'll add deprecation notice later --- config/policy.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/config/policy.go b/config/policy.go index e0eec0cd..319fd8ed 100644 --- a/config/policy.go +++ b/config/policy.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" - "github.com/inconshreveable/log15" "gopkg.in/yaml.v3" po "golang.ngrok.com/ngrok/policy" @@ -78,27 +77,6 @@ func (p *policy) ApplyTCP(opts *tcpOptions) { // policyToString converts the policy into a JSON string representation. This is to help remap Policy to TrafficPolicy. func policyToString(p *policy) string { - logger := log15.New() - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - logger.Warn("WHAT") - log15.Root().Warn("WithPolicy has been deprecated. Please use WithPolicyString instead, as WithPolicy will stop working soon.") - val, err := json.Marshal(p) if err != nil { panic(errors.New(fmt.Sprintf("failed to parse action configuration due to error: %s", err.Error()))) From 6d803f244fb888c3bbbb614e6f829c3347df497d Mon Sep 17 00:00:00 2001 From: kc Date: Fri, 19 Jul 2024 18:28:49 +0000 Subject: [PATCH 06/10] add description and metadata info --- config/common.go | 7 +++++++ config/description.go | 23 +++++++++++++++++++++++ config/domain.go | 21 --------------------- config/http.go | 2 ++ config/tls.go | 2 ++ config/url.go | 23 +++++++++++++++++++++++ internal/tunnel/proto/msg.go | 6 ++++++ 7 files changed, 63 insertions(+), 21 deletions(-) create mode 100644 config/description.go create mode 100644 config/url.go diff --git a/config/common.go b/config/common.go index f65d1c94..1fb60338 100644 --- a/config/common.go +++ b/config/common.go @@ -10,6 +10,13 @@ type commonOpts struct { Metadata string // Tunnel backend metadata. Viewable via the dashboard and API, but has no // bearing on tunnel behavior. + + // The URL to request for this endpoint + URL string + + // user supplied description of the endpoint + Description string + // If not set, defaults to a URI in the format `app://hostname/path/to/executable?pid=12345` ForwardsTo string diff --git a/config/description.go b/config/description.go new file mode 100644 index 00000000..eb0b4a8b --- /dev/null +++ b/config/description.go @@ -0,0 +1,23 @@ +package config + +type descriptionOption string + +func WithDescription(name string) interface { + HTTPEndpointOption + TCPEndpointOption + TLSEndpointOption +} { + return descriptionOption(name) +} + +func (opt descriptionOption) ApplyHTTP(opts *httpOptions) { + opts.Description = string(opt) +} + +func (opt descriptionOption) ApplyTLS(opts *tlsOptions) { + opts.Description = string(opt) +} + +func (opt descriptionOption) ApplyTCP(opts *tcpOptions) { + opts.Description = string(opt) +} diff --git a/config/domain.go b/config/domain.go index 01d9783a..a45018d9 100644 --- a/config/domain.go +++ b/config/domain.go @@ -1,26 +1,5 @@ package config -type urlOption string - -func WithURL(name string) interface { - HTTPEndpointOption - TLSEndpointOption -} { - return urlOption(name) -} - -func (opt urlOption) ApplyHTTP(opts *httpOptions) { - opts.URL = string(opt) -} - -func (opt urlOption) ApplyTLS(opts *tlsOptions) { - opts.URL = string(opt) -} - -func (opt urlOption) ApplyTCP(opts *tcpOptions) { - opts.URL = string(opt) -} - type domainOption string // WithDomain sets the fully-qualified domain name for this edge. diff --git a/config/http.go b/config/http.go index b00421e6..dfd0a12b 100644 --- a/config/http.go +++ b/config/http.go @@ -95,6 +95,8 @@ func (cfg *httpOptions) toProtoConfig() *proto.HTTPEndpoint { Domain: cfg.Domain, Hostname: cfg.Hostname, Subdomain: cfg.Subdomain, + Description: cfg.Description, + Metadata: cfg.Metadata, } if cfg.Compression { diff --git a/config/tls.go b/config/tls.go index 4ae7ecec..21de204e 100644 --- a/config/tls.go +++ b/config/tls.go @@ -67,6 +67,8 @@ func (cfg *tlsOptions) toProtoConfig() *proto.TLSEndpoint { URL: cfg.URL, Domain: cfg.Domain, ProxyProto: proto.ProxyProto(cfg.ProxyProto), + Description: cfg.Description, + Metadata: cfg.Metadata, Subdomain: cfg.Subdomain, Hostname: cfg.Hostname, diff --git a/config/url.go b/config/url.go new file mode 100644 index 00000000..d8909859 --- /dev/null +++ b/config/url.go @@ -0,0 +1,23 @@ +package config + +type urlOption string + +func WithURL(name string) interface { + HTTPEndpointOption + TLSEndpointOption + TCPEndpointOption +} { + return urlOption(name) +} + +func (opt urlOption) ApplyHTTP(opts *httpOptions) { + opts.URL = string(opt) +} + +func (opt urlOption) ApplyTLS(opts *tlsOptions) { + opts.URL = string(opt) +} + +func (opt urlOption) ApplyTCP(opts *tcpOptions) { + opts.URL = string(opt) +} diff --git a/internal/tunnel/proto/msg.go b/internal/tunnel/proto/msg.go index e63fc7c3..a9dbfd6f 100644 --- a/internal/tunnel/proto/msg.go +++ b/internal/tunnel/proto/msg.go @@ -287,6 +287,8 @@ type HTTPEndpoint struct { Hostname string // public hostname of the bind Subdomain string Auth string + Description string + Metadata string HostHeaderRewrite bool // true if the request's host header is being rewritten LocalURLScheme string // scheme of the local forward ProxyProto @@ -311,6 +313,8 @@ type HTTPEndpoint struct { type TCPEndpoint struct { URL string Addr string + Description string + Metadata string ProxyProto // middleware @@ -324,6 +328,8 @@ type TLSEndpoint struct { Domain string Hostname string // public hostname of the bind Subdomain string + Description string + Metadata string ProxyProto MutualTLSAtAgent bool From 475faea2e24bf49e4eb82c1312d8c0ee9abd708d Mon Sep 17 00:00:00 2001 From: kc Date: Sat, 20 Jul 2024 13:42:47 +0000 Subject: [PATCH 07/10] use common opts --- config/http.go | 11 ++++------- config/tcp.go | 5 ++--- config/tls.go | 9 +++------ 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/config/http.go b/config/http.go index dfd0a12b..ac93e8f6 100644 --- a/config/http.go +++ b/config/http.go @@ -38,9 +38,6 @@ type httpOptions struct { // Defaults to [SchemeHTTPS]. Scheme Scheme - // The URL to request for this endpoint - URL string - // The fqdn to request for this edge Domain string @@ -91,10 +88,10 @@ type httpOptions struct { func (cfg *httpOptions) toProtoConfig() *proto.HTTPEndpoint { opts := &proto.HTTPEndpoint{ - URL: cfg.URL, - Domain: cfg.Domain, - Hostname: cfg.Hostname, - Subdomain: cfg.Subdomain, + URL: cfg.URL, + Domain: cfg.Domain, + Hostname: cfg.Hostname, + Subdomain: cfg.Subdomain, Description: cfg.Description, Metadata: cfg.Metadata, } diff --git a/config/tcp.go b/config/tcp.go index a199915e..50eb73a3 100644 --- a/config/tcp.go +++ b/config/tcp.go @@ -33,9 +33,6 @@ type tcpOptions struct { // Common tunnel configuration options. commonOpts - // The URL address to request for this endpoint. - URL string - // The TCP address to request for this edge. RemoteAddr string // An HTTP Server to run traffic on @@ -53,6 +50,8 @@ func WithRemoteAddr(addr string) TCPEndpointOption { func (cfg *tcpOptions) toProtoConfig() *proto.TCPEndpoint { return &proto.TCPEndpoint{ URL: cfg.URL, + Description: cfg.Description, + Metadata: cfg.Metadata, Addr: cfg.RemoteAddr, IPRestriction: cfg.commonOpts.CIDRRestrictions.toProtoConfig(), ProxyProto: proto.ProxyProto(cfg.commonOpts.ProxyProto), diff --git a/config/tls.go b/config/tls.go index 21de204e..b23dc1b3 100644 --- a/config/tls.go +++ b/config/tls.go @@ -35,9 +35,6 @@ type tlsOptions struct { // Common tunnel options commonOpts - // The URL to request for this endpoint - URL string - // The fqdn to request for this edge. Domain string @@ -64,9 +61,9 @@ type tlsOptions struct { func (cfg *tlsOptions) toProtoConfig() *proto.TLSEndpoint { opts := &proto.TLSEndpoint{ - URL: cfg.URL, - Domain: cfg.Domain, - ProxyProto: proto.ProxyProto(cfg.ProxyProto), + URL: cfg.URL, + Domain: cfg.Domain, + ProxyProto: proto.ProxyProto(cfg.ProxyProto), Description: cfg.Description, Metadata: cfg.Metadata, From c14b0b6a9331e8cfac4fe4f8eedb76e0b80b434e Mon Sep 17 00:00:00 2001 From: kc Date: Tue, 30 Jul 2024 15:47:03 +0000 Subject: [PATCH 08/10] move to extra instead --- config/bindings.go | 2 +- config/http.go | 15 +++++++-------- config/tcp.go | 7 +++---- config/tls.go | 18 ++++++++---------- internal/tunnel/proto/msg.go | 7 +------ 5 files changed, 20 insertions(+), 29 deletions(-) diff --git a/config/bindings.go b/config/bindings.go index 2002db1b..be1e38eb 100644 --- a/config/bindings.go +++ b/config/bindings.go @@ -27,4 +27,4 @@ func (b bindings) ApplyTCP(cfg *tcpOptions) { func (b bindings) ApplyHTTP(cfg *httpOptions) { cfg.Bindings = []string(b) -} +} \ No newline at end of file diff --git a/config/http.go b/config/http.go index ac93e8f6..c09ae81d 100644 --- a/config/http.go +++ b/config/http.go @@ -88,12 +88,10 @@ type httpOptions struct { func (cfg *httpOptions) toProtoConfig() *proto.HTTPEndpoint { opts := &proto.HTTPEndpoint{ - URL: cfg.URL, - Domain: cfg.Domain, - Hostname: cfg.Hostname, - Subdomain: cfg.Subdomain, - Description: cfg.Description, - Metadata: cfg.Metadata, + URL: cfg.URL, + Domain: cfg.Domain, + Hostname: cfg.Hostname, + Subdomain: cfg.Subdomain, } if cfg.Compression { @@ -149,8 +147,9 @@ func (cfg *httpOptions) WithForwardsTo(url *url.URL) { func (cfg httpOptions) Extra() proto.BindExtra { return proto.BindExtra{ - Metadata: cfg.Metadata, - Bindings: cfg.Bindings, + Metadata: cfg.Metadata, + Description: cfg.Description, + Bindings: cfg.Bindings, } } diff --git a/config/tcp.go b/config/tcp.go index 50eb73a3..b63859af 100644 --- a/config/tcp.go +++ b/config/tcp.go @@ -50,8 +50,6 @@ func WithRemoteAddr(addr string) TCPEndpointOption { func (cfg *tcpOptions) toProtoConfig() *proto.TCPEndpoint { return &proto.TCPEndpoint{ URL: cfg.URL, - Description: cfg.Description, - Metadata: cfg.Metadata, Addr: cfg.RemoteAddr, IPRestriction: cfg.commonOpts.CIDRRestrictions.toProtoConfig(), ProxyProto: proto.ProxyProto(cfg.commonOpts.ProxyProto), @@ -73,8 +71,9 @@ func (cfg *tcpOptions) WithForwardsTo(url *url.URL) { func (cfg tcpOptions) Extra() proto.BindExtra { return proto.BindExtra{ - Metadata: cfg.Metadata, - Bindings: cfg.Bindings, + Metadata: cfg.Metadata, + Description: cfg.Description, + Bindings: cfg.Bindings, } } diff --git a/config/tls.go b/config/tls.go index b23dc1b3..82490357 100644 --- a/config/tls.go +++ b/config/tls.go @@ -61,14 +61,11 @@ type tlsOptions struct { func (cfg *tlsOptions) toProtoConfig() *proto.TLSEndpoint { opts := &proto.TLSEndpoint{ - URL: cfg.URL, - Domain: cfg.Domain, - ProxyProto: proto.ProxyProto(cfg.ProxyProto), - Description: cfg.Description, - Metadata: cfg.Metadata, - - Subdomain: cfg.Subdomain, - Hostname: cfg.Hostname, + URL: cfg.URL, + Domain: cfg.Domain, + ProxyProto: proto.ProxyProto(cfg.ProxyProto), + Subdomain: cfg.Subdomain, + Hostname: cfg.Hostname, } opts.IPRestriction = cfg.commonOpts.CIDRRestrictions.toProtoConfig() @@ -102,8 +99,9 @@ func (cfg *tlsOptions) WithForwardsTo(url *url.URL) { func (cfg tlsOptions) Extra() proto.BindExtra { return proto.BindExtra{ - Metadata: cfg.Metadata, - Bindings: cfg.Bindings, + Metadata: cfg.Metadata, + Description: cfg.Description, + Bindings: cfg.Bindings, } } diff --git a/internal/tunnel/proto/msg.go b/internal/tunnel/proto/msg.go index a9dbfd6f..548f9100 100644 --- a/internal/tunnel/proto/msg.go +++ b/internal/tunnel/proto/msg.go @@ -224,6 +224,7 @@ type BindExtra struct { Token string IPPolicyRef string Metadata string + Description string Bindings []string } @@ -287,8 +288,6 @@ type HTTPEndpoint struct { Hostname string // public hostname of the bind Subdomain string Auth string - Description string - Metadata string HostHeaderRewrite bool // true if the request's host header is being rewritten LocalURLScheme string // scheme of the local forward ProxyProto @@ -313,8 +312,6 @@ type HTTPEndpoint struct { type TCPEndpoint struct { URL string Addr string - Description string - Metadata string ProxyProto // middleware @@ -328,8 +325,6 @@ type TLSEndpoint struct { Domain string Hostname string // public hostname of the bind Subdomain string - Description string - Metadata string ProxyProto MutualTLSAtAgent bool From 2636ff573bc6a534d686874d5886b76b8cd45ba5 Mon Sep 17 00:00:00 2001 From: warren Date: Wed, 21 Aug 2024 20:06:48 +0000 Subject: [PATCH 09/10] add desc for labeled --- config/description.go | 5 +++++ config/labeled.go | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config/description.go b/config/description.go index eb0b4a8b..c8742718 100644 --- a/config/description.go +++ b/config/description.go @@ -6,6 +6,7 @@ func WithDescription(name string) interface { HTTPEndpointOption TCPEndpointOption TLSEndpointOption + LabeledTunnelOption } { return descriptionOption(name) } @@ -21,3 +22,7 @@ func (opt descriptionOption) ApplyTLS(opts *tlsOptions) { func (opt descriptionOption) ApplyTCP(opts *tcpOptions) { opts.Description = string(opt) } + +func (opt descriptionOption) ApplyLabeled(opts *labeledOptions) { + opts.Description = string(opt) +} diff --git a/config/labeled.go b/config/labeled.go index 5e9259a3..2fc95422 100644 --- a/config/labeled.go +++ b/config/labeled.go @@ -66,7 +66,8 @@ func (cfg *labeledOptions) WithForwardsTo(url *url.URL) { func (cfg labeledOptions) Extra() proto.BindExtra { return proto.BindExtra{ - Metadata: cfg.Metadata, + Metadata: cfg.Metadata, + Description: cfg.Description, } } From 4c1566116b28c99d7e63f42b2bfba6b1fe4afcf5 Mon Sep 17 00:00:00 2001 From: kc Date: Tue, 27 Aug 2024 17:07:51 +0000 Subject: [PATCH 10/10] add newline end of file for formatting --- config/bindings.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/bindings.go b/config/bindings.go index be1e38eb..2002db1b 100644 --- a/config/bindings.go +++ b/config/bindings.go @@ -27,4 +27,4 @@ func (b bindings) ApplyTCP(cfg *tcpOptions) { func (b bindings) ApplyHTTP(cfg *httpOptions) { cfg.Bindings = []string(b) -} \ No newline at end of file +}