proxyparser 0.1.0

A cross-platform system proxy detector with strong support for complex enterprise PAC scripts
Documentation
1
2
3
4
5
6
7
8
9
10
11
// src/pac/mod.rs
pub mod downloader;
pub mod engine;

pub use engine::evaluate_pac_for_url;

/// 判断一个字符串是否像是 PAC 脚本 URL
pub fn is_pac_url(s: &str) -> bool {
    let lower = s.to_lowercase();
    lower.ends_with(".pac") || lower.contains("proxy.pac") || lower.contains("wpad.dat")
}