The rule editor no longer requires writing expr by hand. Conditions are rows of field + operator + values joined with AND or OR, each row negatable, and the generated expression is shown live and validated by the engine before a rule is accepted. Raw expression and YAML editing are still available. Fields cover the connection (protocol, source/destination IP and port), domains (TLS SNI, QUIC SNI, DNS query name), HTTP (host, path, method, User-Agent) and protocol detection. Operators cover CIDR membership, GeoIP countries, GeoSite categories, port ranges, wildcards, substrings and regular expressions. Multiple values in a row are OR-ed, so one row holds a whole domain or country list. Wildcards compile to the cheapest expression that matches them: *.x.com becomes endsWith, x.* startsWith, *ad* contains, and only a star in the middle falls back to a regular expression. Values are validated as they are typed, including a hint when a star is used with an operator that would match it literally. Country and category pickers are backed by the databases the engine actually loaded, via a new GET /api/v1/geo endpoint (cached, loaded on demand) built on new listing methods in the geo package. Country names and flags come from Intl.DisplayNames, so no name table is shipped. Note that the v2geo format has no AS numbers; the provider groups it does contain (cloudflare, google, telegram, ...) are listed alongside the countries. Opening an existing rule parses its expression back into conditions. Anything the builder cannot represent opens in the expression editor with a warning rather than being rewritten. ruleset/expr_test.go pins the canonical expressions the builder generates and compiles them with the real engine, and the devserver now uses the real ruleset compiler so the same errors show up during frontend work. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
21 lines
1.1 KiB
TypeScript
21 lines
1.1 KiB
TypeScript
export { default as Badge, badgeVariants } from './Badge.vue'
|
|
export { default as Button, buttonVariants } from './Button.vue'
|
|
export { default as Card } from './Card.vue'
|
|
export { default as CardContent } from './CardContent.vue'
|
|
export { default as CardDescription } from './CardDescription.vue'
|
|
export { default as CardHeader } from './CardHeader.vue'
|
|
export { default as CardTitle } from './CardTitle.vue'
|
|
export { default as Input } from './Input.vue'
|
|
export { default as Label } from './Label.vue'
|
|
export { default as Modal } from './Modal.vue'
|
|
export { default as Select } from './Select.vue'
|
|
export { default as Separator } from './Separator.vue'
|
|
export { default as Skeleton } from './Skeleton.vue'
|
|
export { default as Switch } from './Switch.vue'
|
|
export { default as Tabs } from './Tabs.vue'
|
|
export { default as TagsInput } from './TagsInput.vue'
|
|
export { default as TabsContent } from './TabsContent.vue'
|
|
export { default as TabsList } from './TabsList.vue'
|
|
export { default as TabsTrigger } from './TabsTrigger.vue'
|
|
export { default as Textarea } from './Textarea.vue'
|