-
Notifications
You must be signed in to change notification settings - Fork 573
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 new clash subscription #1468
Conversation
return dbsetting | ||
|
||
|
||
def generate_subscription(db: Session, dbuser: User, user_agent: str): |
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.
we have a directory for subscription classes and generating them , why all of this cod this in routers ?
routers is just for api requests
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.
because it has a set of api to add, modify or delete proxy, proxy group, rule, ruleset or settings
@@ -63,6 +63,10 @@ def user_subscription( | |||
{"user": user} | |||
) | |||
) | |||
|
|||
if len(user.sub_tags) > 0 and len(user.sub_url_prefix) > 0: | |||
from app.routers.clash import generate_subscription |
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.
also your importing from routers in here, if you just follow project structure and put your code in right place there is no need to make unnecessary dependencies
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.
I want to compat with current subscription of Marzban
can you dm me in telegram @zhongfq same id at telegram |
sorry, I have no telegram |
can you you add next_plan to the front? |
ok, I will try in these days. |
Hello, thanks for you efforts. first check, add_clash_sub migration doesn't run, due to bad revision. |
I design a subscription system for clash like app, how to use:
other features:
2.add a rule