mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2026-02-05 09:57:56 +00:00
Parse shadowsocks
This commit is contained in:
@@ -5,10 +5,11 @@ use crate::config_models::{
|
||||
};
|
||||
use crate::utils::{inbound_generator, parse_raw_json};
|
||||
|
||||
mod shadow_socks;
|
||||
mod trojan;
|
||||
mod uri_identifier;
|
||||
mod vless;
|
||||
mod vmess;
|
||||
mod trojan;
|
||||
|
||||
pub fn get_name(uri: &str) -> String {
|
||||
let (_, data, _) = get_uri_data(uri);
|
||||
@@ -168,6 +169,11 @@ fn get_uri_data(uri: &str) -> (String, RawData, OutboundSettings) {
|
||||
let s = trojan::create_outbound_settings(&d);
|
||||
(String::from("trojan"), d, s)
|
||||
}
|
||||
Some(uri_identifier::Protocols::Shadowsocks) => {
|
||||
let d = shadow_socks::data::get_data(uri);
|
||||
let s = shadow_socks::create_outbound_settings(&d);
|
||||
(String::from("shadowsocks"), d, s)
|
||||
}
|
||||
Some(_) => {
|
||||
panic!("The protocol was recognized but is not supported yet");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user