rustix3 0.6.0

API lib for 3x-ui panel
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use rustix3::inbounds::InboundProtocols;

#[test]
fn inbound_protocol_shadowsocks_serializes() {
    let json = serde_json::to_string(&InboundProtocols::ShadowsSocks).unwrap();
    assert_eq!(json, "\"shadowsocks\"");
}

#[test]
fn inbound_protocol_unknown_deserializes() {
    let val: InboundProtocols = serde_json::from_str("\"new-proto\"").unwrap();
    assert!(matches!(val, InboundProtocols::Unknown));
}