Documentation
¶
Index ¶
- Constants
- func DeduplicateImported(eps []v2rayn.ImportedEndpoint) []v2rayn.ImportedEndpoint
- func FetchSubscription(ctx context.Context, rawURL string, opts SubscriptionOptions) (string, string, error)
- func ImportLinkFile(path string) ([]v2rayn.ImportedEndpoint, error)
- func ImportPastedSubscriptions(ctx context.Context, text string, opts SubscriptionOptions) ([]v2rayn.ImportedEndpoint, error)
- func ImportSubscriptionURLs(ctx context.Context, urls []string, opts SubscriptionOptions) ([]v2rayn.ImportedEndpoint, error)
- func ImportV2rayN(dir string) ([]v2rayn.ImportedEndpoint, error)
- type SubscriptionOptions
Constants ¶
View Source
const ( DefaultSubscriptionTimeout = 15 * time.Second DefaultSubscriptionMaxBytes = 5 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func DeduplicateImported ¶
func DeduplicateImported(eps []v2rayn.ImportedEndpoint) []v2rayn.ImportedEndpoint
func FetchSubscription ¶ added in v1.1.0
func FetchSubscription(ctx context.Context, rawURL string, opts SubscriptionOptions) (string, string, error)
FetchSubscription downloads a single HTTP(S) URL with timeout and response body limits. Returned errors use a sanitized URL without query/fragment data.
func ImportLinkFile ¶
func ImportLinkFile(path string) ([]v2rayn.ImportedEndpoint, error)
func ImportPastedSubscriptions ¶ added in v1.1.0
func ImportPastedSubscriptions(ctx context.Context, text string, opts SubscriptionOptions) ([]v2rayn.ImportedEndpoint, error)
ImportPastedSubscriptions accepts text pasted into the TUI. HTTP(S) tokens are fetched; non-HTTP content is parsed locally as raw share links or a pasted base64/plain subscription body.
func ImportSubscriptionURLs ¶ added in v1.1.0
func ImportSubscriptionURLs(ctx context.Context, urls []string, opts SubscriptionOptions) ([]v2rayn.ImportedEndpoint, error)
ImportSubscriptionURLs fetches one or more HTTP(S) subscription URLs and parses v2rayN/base64/plain share-link content from the response bodies.
func ImportV2rayN ¶
func ImportV2rayN(dir string) ([]v2rayn.ImportedEndpoint, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.