@@ -17,8 +17,12 @@ impl From<talpid_types::net::TunnelEndpoint> for proto::TunnelEndpoint {
17
17
address : proxy_ep. endpoint . address . to_string ( ) ,
18
18
protocol : i32:: from ( proto:: TransportProtocol :: from ( proxy_ep. endpoint . protocol ) ) ,
19
19
proxy_type : match proxy_ep. proxy_type {
20
- net:: proxy:: ProxyType :: Shadowsocks => i32:: from ( proto:: ProxyType :: Shadowsocks ) ,
21
- net:: proxy:: ProxyType :: Custom => i32:: from ( proto:: ProxyType :: Custom ) ,
20
+ net:: proxy:: ProxyType :: Shadowsocks => {
21
+ i32:: from ( proto:: proxy_endpoint:: ProxyType :: Shadowsocks )
22
+ }
23
+ net:: proxy:: ProxyType :: Custom => {
24
+ i32:: from ( proto:: proxy_endpoint:: ProxyType :: Custom )
25
+ }
22
26
} ,
23
27
} ) ,
24
28
obfuscation : endpoint. obfuscation . map ( |obfuscation_endpoint| {
@@ -77,11 +81,15 @@ impl TryFrom<proto::TunnelEndpoint> for talpid_types::net::TunnelEndpoint {
77
81
) ?,
78
82
protocol : try_transport_protocol_from_i32 ( proxy_ep. protocol ) ?,
79
83
} ,
80
- proxy_type : match proto:: ProxyType :: try_from ( proxy_ep. proxy_type ) {
81
- Ok ( proto:: ProxyType :: Shadowsocks ) => {
84
+ proxy_type : match proto:: proxy_endpoint:: ProxyType :: try_from (
85
+ proxy_ep. proxy_type ,
86
+ ) {
87
+ Ok ( proto:: proxy_endpoint:: ProxyType :: Shadowsocks ) => {
82
88
talpid_net:: proxy:: ProxyType :: Shadowsocks
83
89
}
84
- Ok ( proto:: ProxyType :: Custom ) => talpid_net:: proxy:: ProxyType :: Custom ,
90
+ Ok ( proto:: proxy_endpoint:: ProxyType :: Custom ) => {
91
+ talpid_net:: proxy:: ProxyType :: Custom
92
+ }
85
93
Err ( _) => {
86
94
return Err ( FromProtobufTypeError :: InvalidArgument (
87
95
"unknown proxy type" ,
0 commit comments