سازندهٔ قوانین sing-box
Create routing rules in your browser: proxy, direct, or block.
قوانین ذخیرهشدهٔ من
برای ذخیرهٔ قوانین و استفاده در تبدیلهای بعدی وارد حساب شوید.
فضای کار فعلی
در اینجا قوانین را ویرایش کنید، قطعهٔ قانون بسازید یا آنها را با پیکربندی موجود ادغام کنید.
Start with your first rule
قوانین حساب بالا را بارگذاری کنید، قانون جدیدی بسازید یا نمونه را امتحان کنید.
Next: add a rule, or try the example.
قوانین سراسری
در صورت نیاز، قوانین را پیشنمایش دهید و به فضای کار اضافه کنید. وارد کردن، آنها را در حساب ذخیره نمیکند.
Select local sing-box rules and generate explicit output while retaining outbounds and original configuration.
Find your saved rules
After signing in, choose “View my rules” in “My saved rules” at the top of the page. The list shows match values and destinations so you can check custom names such as HK Auto. Viewing does not change the workspace or saved account rules.
Choose “Edit” or “Load into workspace” to work on saved rules. If your workspace already contains rules, review the replacement first; cancel to keep your draft. “Save to workspace” in the editor only updates the current draft. When ready, select the rules to keep, choose “Save to account” and confirm. This replaces the saved rules for that format and affects future conversions and subscriptions that use account preferences. Saving with no rules selected clears that format’s account rules.
Create and generate
- Create a rule, choose its match type, enter domains or IP ranges, then choose proxy, direct, block or a named proxy group. Use one value per line.
- Review values, destinations and order in the workspace. Select only the rules you need.
- Choose “Rules only” for a fragment to paste, or “Merge into a config” to paste or import an existing configuration and generate a full result.
- Copy or download the result. “View result” reopens it later. Generating and downloading do not save rules to your account.
Destination names and order
A custom destination must exactly match a policy group or outbound in the configuration. A rule naming HK Auto requires a group with that exact name in the template; check names again after changing templates. Choose auto when you do not need a fixed name: merge mode uses the configuration’s default proxy group, while auto in a standalone fragment is a placeholder to replace. You can read configuration targets in “Advanced settings”, then edit a rule to choose an existing name.
Supports full domains, suffixes, keywords, IPv4/IPv6 CIDR and two-letter GeoIP country codes. Separate values by lines or commas; duplicates retain their first occurrence and comments are ignored. Selected rules follow workspace order. New rules are prepended by default; appending may place them after an existing catch-all. Replace changes only the rules list, keeping other configuration and rule sets.
sing-box uses route / reject actions. DIRECT needs an existing direct outbound. GeoIP uses binary rule-set references; the tool does not download them. Final outbound stays unchanged unless you explicitly choose to change it. Original input stays unchanged until you choose “Use result as input”.
Import global rules as needed
Choose “Import global rules”, select rules, review the fragment and decide whether to prepend, append or replace workspace rules. Importing does not save to your account; use “Save to account” separately. Custom destinations retain their names; no groups, outbounds or fallbacks are created. A version change requires a fresh read and review, never an automatic overwrite.
Privacy and limits
Configuration and results stay on this page and clear when you leave or change account or language. Account rules are read or written only when you explicitly choose to view, load or save them. The workspace never syncs automatically. Viewing or loading does not change the original configuration, merge position or final-outbound opt-in. A save conflict preserves your draft for a fresh review.
Up to 100 rule groups, 200 values / 4,000 characters per group and 2,000 values per operation; 256 Ki configuration characters, 1 MiB per file and 2 Mi result characters. Duplicate keys, invalid structures and oversized content are refused without truncation. Merging preserves field meaning, not YAML comments or formatting. Results may retain original passwords; keep them private. This tool does not simulate traffic or replace client runtime checks.
گفتگو 0
پرسشی مطرح کنید یا نکتهای مفید برای خوانندهٔ بعدی بنویسید.
برای نوشتن دیدگاه، پاسخ و رأی دادن وارد شوید.
برای شرکت در گفتگو وارد شوید