Skip to main content

SubscriptionSettings

Struct SubscriptionSettings 

Source
pub struct SubscriptionSettings {
Show 49 fields pub happ_link_enable: bool, pub sub_info_node_enable: bool, pub sub_calendar_expire_inclusive: bool, pub sub_expired_template: String, pub sub_traffic_depleted_template: String, pub happ: HappSettings, pub sub_enable: bool, pub sub_json_enable: bool, pub sub_json_auto_detect: bool, pub sub_json_always_array: bool, pub sub_json_user_agent_regex: String, pub sub_clash_auto_detect: bool, pub sub_clash_user_agent_regex: String, pub sub_title: String, pub sub_support_url: String, pub sub_profile_mode: String, pub sub_profile_url: String, pub sub_announce: String, pub sub_enable_routing: bool, pub sub_routing_rules: String, pub sub_incy_enable_routing: bool, pub sub_incy_routing_rules: String, pub sub_listen: String, pub sub_port: u16, pub sub_path: String, pub sub_domain: String, pub sub_cert_file: String, pub sub_key_file: String, pub sub_updates: u32, pub external_traffic_inform_enable: bool, pub external_traffic_inform_uri: String, pub restart_xray_on_client_disable: bool, pub sub_encrypt: bool, pub sub_uri: String, pub sub_json_path: String, pub sub_json_uri: String, pub sub_clash_enable: bool, pub sub_clash_path: String, pub sub_clash_uri: String, pub sub_clash_enable_routing: bool, pub sub_clash_rules: String, pub sub_json_mux: String, pub sub_json_rules: String, pub sub_json_routing_rules: String, pub sub_json_dns: String, pub sub_json_final_mask: String, pub sub_json_observatory: String, pub sub_theme_dir: String, pub sub_hide_settings: bool,
}
Expand description

Subscription server and generated-format settings.

Fields§

§happ_link_enable: bool

Enables local Happ Crypt5 link generation.

§sub_info_node_enable: bool

Adds a synthetic usage/status node to subscriptions.

§sub_calendar_expire_inclusive: bool

Presents calendar expiry as the inclusive end of the previous month.

§sub_expired_template: String

Subscription template for expired clients.

§sub_traffic_depleted_template: String

Subscription template for clients with depleted traffic.

§happ: HappSettings

Happ application settings, flattened on the wire.

§sub_enable: bool

Enables the subscription server.

§sub_json_enable: bool

Enables JSON subscriptions.

§sub_json_auto_detect: bool

Auto-detects JSON subscription clients.

§sub_json_always_array: bool

Always emits a JSON array.

§sub_json_user_agent_regex: String

User-agent regex for JSON subscriptions.

§sub_clash_auto_detect: bool

Auto-detects Clash clients.

§sub_clash_user_agent_regex: String

User-agent regex for Clash subscriptions.

§sub_title: String

Subscription title.

§sub_support_url: String

Support URL.

§sub_profile_mode: String

Profile page mode: none (default), builtin, or custom.

§sub_profile_url: String

Profile URL.

§sub_announce: String

Announcement text.

§sub_enable_routing: bool

Enables base subscription routing rules.

§sub_routing_rules: String

Base subscription routing rules.

§sub_incy_enable_routing: bool

Enables Incy routing rules.

§sub_incy_routing_rules: String

Incy routing rules.

§sub_listen: String

Subscription listener IP.

§sub_port: u16

Subscription server port.

§sub_path: String

Base subscription path.

§sub_domain: String

Subscription domain.

§sub_cert_file: String

Subscription TLS certificate path.

§sub_key_file: String

Subscription TLS private-key path.

§sub_updates: u32

Subscription update interval.

§external_traffic_inform_enable: bool

Enables external traffic reporting.

§external_traffic_inform_uri: String

External traffic reporting URI.

§restart_xray_on_client_disable: bool

Restarts Xray when a client is disabled.

§sub_encrypt: bool

Encrypts subscription identifiers.

§sub_uri: String

Public base subscription URI.

§sub_json_path: String

JSON subscription path.

§sub_json_uri: String

Public JSON subscription URI.

§sub_clash_enable: bool

Enables Clash subscriptions.

§sub_clash_path: String

Clash subscription path.

§sub_clash_uri: String

Public Clash subscription URI.

§sub_clash_enable_routing: bool

Enables Clash routing.

§sub_clash_rules: String

Clash routing rules.

§sub_json_mux: String

JSON mux template.

§sub_json_rules: String

JSON routing rules.

§sub_json_routing_rules: String

Additional JSON subscription routing rules.

§sub_json_dns: String

DNS servers included in JSON subscriptions.

§sub_json_final_mask: String

JSON final-mask template.

§sub_json_observatory: String

JSON observatory template merged into generated subscriptions.

§sub_theme_dir: String

Subscription theme directory.

§sub_hide_settings: bool

Hides settings from subscription output.

Trait Implementations§

Source§

impl Clone for SubscriptionSettings

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SubscriptionSettings

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SubscriptionSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SubscriptionSettings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for SubscriptionSettings

Source§

impl PartialEq for SubscriptionSettings

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for SubscriptionSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SubscriptionSettings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more