VpnTrafficFilter 类

定义

定义流量筛选属性(包括每个应用 VPN)。 描述将通过 VPN 连接允许的网络流量类型,例如允许连接的特定应用程序和协议。

public ref class VpnTrafficFilter sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Networking.Vpn.IVpnTrafficFilterFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class VpnTrafficFilter final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Networking.Vpn.IVpnTrafficFilterFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class VpnTrafficFilter final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Networking.Vpn.IVpnTrafficFilterFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public sealed class VpnTrafficFilter
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Networking.Vpn.IVpnTrafficFilterFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class VpnTrafficFilter
Public NotInheritable Class VpnTrafficFilter
继承
Object Platform::Object IInspectable VpnTrafficFilter
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)
应用功能
networkingVpnProvider

构造函数

VpnTrafficFilter(VpnAppId)

允许 VPN 插件或 VPN 管理应用创建流量筛选器。

属性

AppClaims

获取一个安全描述符,该描述符指定进程必须允许此流量筛选器允许的声明集。

AppId

获取或设置此流量筛选器允许的应用的 ID。

LocalAddressRanges

获取此流量筛选器允许的本地地址范围的列表。

LocalPortRanges

获取此流量筛选器允许的本地端口范围的列表。 特别适用于标识 SMB。

Protocol

获取或设置此流量筛选器允许的 IP 协议。

RemoteAddressRanges

获取此流量筛选器允许的远程地址范围的列表。

RemotePortRanges

获取此流量筛选器允许的远程端口范围的列表。

RoutingPolicyType

获取或设置此流量筛选器允许的应用是强制通过 VPN 接口隧道的,还是通过隧道拆分,并允许通过其他接口进行对话。

适用于