-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(caddy): add Caddy support for Outline services #198
Conversation
…r proxy protocol.
) | ||
|
||
func (OutlineApp) CaddyModule() caddy.ModuleInfo { | ||
return caddy.ModuleInfo{ID: outlineModuleName} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note we still need to provide a ModuleInfo with an accurate ID, so there is some duplication here now, but New()
isn't used from it as far as I can tell. This is also why I'm not logging any errors here, since it is called and used in a few places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's unfortunate. At least we don't have the two module objects co-existing anymore. Thanks for the changes.
) | ||
|
||
func (OutlineApp) CaddyModule() caddy.ModuleInfo { | ||
return caddy.ModuleInfo{ID: outlineModuleName} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's unfortunate. At least we don't have the two module objects co-existing anymore. Thanks for the changes.
…don't need a zap adapter for Caddy.
This proof of concept lays the foundation for integrating Outline service support into Caddy through the implementation of two new Caddy modules:
outline
Host Module: This module serves as the central hub for server-wide configuration settings related to the Outline service. It also handles the configuration of application-level metrics, ensuring we can monitor the service's performance effectively.shadowsocks
Layer4 App Guest Module: This module introduces a specialized handler to manage both stream-based and packet-based Shadowsocks connections. It operates in conjunction with the outline host module, utilizing its shared configuration settings.Note:
While this PR establishes the core functionality, there are outstanding tasks related to metrics that might be addressed in separate PRs for better organization and focus:
shadowsocks_
prefix, particularly for server-wide metrics like{PREFIX}_build_info
, and{PREFIX}_ports
, which aren't specifically tied to Shadowsocks.outline
module.{PREFIX}_keys
and{PREFIX_ports}
metrics in this Caddy implementation.