This is a breaking-change release that updates ngrok-go to a new, simplified API.
Enhancements:
- Dramatically simplified the API to remove many overlapping options, options that are now deprecated, unnecessary convenience functions, and more.
- Simplified the API by removing all protocol-specific behaviors (which have all been moved to Traffic Policy).
- Removed the config package. All of its options are now folded into the top-level package or removed because they were migrated into Traffic Policy.
- Updates the API to use new ngrok terminology of Agents, Endpoints Upstreams, and Traffic Policy.
- Removes functionality that is now deprecated (like labeled tunnels).
- Added support for agent-based TLS termination and Mutual TLS termination.
- Added support for full TLS control over forwarding to the upstream.
- Added support for full control over dialing the upstream.
- Removed a bespoke logging interface in favor of
log/slog. - Removed the prototype policy package that was not well supported.
- Separated out a concept of an Agent from its Session which were previously co-mingled.
- Added integration tests.
Fixes:
- Fix reported version of the ngrok-go sdk.
Breaking changes:
- Renames pre-release option
WithAllowsPoolingtoWithPoolingEnabled
Enhancements:
- Adds
WithAllowsPoolingoption, allowing the endpoint to pool with other endpoints with the same host/port/binding - Adds
WithURLoption, specifying a URL for the endpoint - Adds
WithTrafficPolicyoption, applying Traffic Policy to the endpoint
Changes:
- Deprecates
WithPolicyStringin favor ofWithTrafficPolicy
Enhancements:
- Adds fasthttp example
- Adds
WithBindingsoption - Adds support for
TrafficPolicyfield
Changes:
- Replace log adapter module license symlinks with full files
- Send
Policyto the backend as aTrafficPolicystring - unsafe.Pointer -> atomic.Pointer
Bug fixes:
- Propagate half-closes correctly in forward
Bug fixes:
- Protect against writing to closed channel on shutdown
Enhancements:
- Adds
WithAdditionalServersandWithMultiLegoptions
Enhancements:
- Provides access to structs for building a Traffic Policy configuration
Breaking changes:
- Renames pre-release option
WithPolicyConfigtoWithPolicyString - Changes signature of
WithPolicyoption to accept the newly exposed structs for building a Traffic Policy configuration
- Adds the
WithPolicyandWithPolicyConfigoptions for applying a Traffic Policy to an endpoint.
-
Adds the
WithAppProtocoloption for labeled listeners and HTTP endpoints.This provides a protocol hint that can be used to enable support for HTTP/2 to the backend service.
- Adds support for remote stop of listener.
- Adds TLS Renegotiation to the backend
tls.Config.
- Added new forwarding API. See
[Session].ListenAndForwardand[Session].ListenAndServeHTTP. - Deprecates
WithHTTPServerandWithHTTPHandler. Use[Session].ListenAndServeHTTPinstead.
- Switch to
connect.ngrok-agent.com:443as the default server address - Add nicer error types that expose the ngrok error code
Enhancements:
- Initial release