Skip to content
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

add sub support #281

Merged
merged 6 commits into from
Jan 28, 2024
Merged

add sub support #281

merged 6 commits into from
Jan 28, 2024

Conversation

Ehco1996
Copy link
Owner

ad title

This commit refactors the web server implementation and improves the handling of clash subscriptions. It introduces a new `Server` struct in the `web` package, which encapsulates the Echo web framework and provides a cleaner interface for registering routes and middleware. The `NewServer` function now takes an additional `relayReloader` parameter, which allows the server to reload relay configurations when necessary.

The `Config` struct in the `config` package has been enhanced to include a `cachedClashSubMap` field, which stores Clash subscription objects for efficient retrieval. The `GetClashSubList` method has been added to retrieve a list of Clash subscriptions from the configuration. Additionally, the `getOrCreateClashSub` method has been introduced to handle the creation and caching of Clash subscription objects.

These changes improve the overall organization and maintainability of the codebase.
@Ehco1996 Ehco1996 merged commit e91e89e into master Jan 28, 2024
1 check passed
@Ehco1996 Ehco1996 deleted the add-sub-support branch March 29, 2024 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant