|
OpenVPN 3 Core Library
|
#include "test_common.hpp"#include "test_generators.hpp"#include <rapidcheck/state.h>#include <iostream>#include <openvpn/common/file.hpp>#include <openvpn/tun/builder/capture.hpp>Go to the source code of this file.
Classes | |
| struct | SetRemoteAddress |
| struct | AddAddress |
| struct | RerouteGW |
| struct | SetRouteMetricDefault |
| struct | AddRoute |
| struct | ExcludeRoute |
| struct | SetDNSOptions |
| struct | SetLayer |
| struct | SetMTU |
| struct | SetSessionName |
| struct | AddProxyBypass |
| struct | SetProxyAutoConfigURL |
| struct | SetProxyHTTP |
| struct | SetProxyHTTPS |
| struct | AddWINSServer |
| struct | SetAllowFamily |
| struct | SetAllowLocalDNS |
| struct | ResetTunnelAddresses |
| struct | ResetDNSOptions |
| struct | VPN_IPv4 |
| struct | VPN_IPv6 |
| struct | VPN_IP |
Functions | |
| TEST (misc, capture) | |
| TEST (RemoteAddress, EmptyIsNotDefined) | |
| RC_ASSERT (remote_address.defined()) | |
| TEST (RemoteAddress, EmptyStringRepresentation) | |
| TEST (RemoteAddress, EmptyStringRepresentationIncludesIPv6Setting) | |
| RC_ASSERT_THROWS_AS (remote_address.validate(title), openvpn::IP::ip_exception) | |
| remote_address | validate (title) |
| from_json | from_json (address_as_json, title) |
| RC_ASSERT_THROWS_AS (from_json.validate(title), openvpn::IP::ip_exception) | |
| from_json | from_json (invalid_json, title) |
| RC_ASSERT (from_json.ipv6==ipv6) | |
| TEST (RerouteGW, EmptyStringRepresentationReturnsUnsetOptions) | |
| if (flags &RedirectGatewayFlags::RG_ENABLE) ret+ | |
| if (flags &RedirectGatewayFlags::RG_REROUTE_GW) ret+ | |
| if (flags &RedirectGatewayFlags::RG_LOCAL) ret+ | |
| if (flags &RedirectGatewayFlags::RG_AUTO_LOCAL) ret+ | |
| if (flags &RedirectGatewayFlags::RG_DEF1) ret+ | |
| if (flags &RedirectGatewayFlags::RG_BYPASS_DHCP) ret+ | |
| if (flags &RedirectGatewayFlags::RG_BYPASS_DNS) ret+ | |
| if (flags &RedirectGatewayFlags::RG_BLOCK_LOCAL) ret+ | |
| if (flags &RedirectGatewayFlags::RG_IPv4) ret+ | |
| if (flags &RedirectGatewayFlags::RG_IPv6) ret+ | |
| RC_ASSERT (reroute_gw.to_string()==ipv4_and_ipv6_return_string+"flags="+ret) | |
| from_json | from_json (reroute_gw_as_json, title) |
| RC_ASSERT_THROWS_AS (from_json.from_json(invalid_json, title), json::json_parse) | |
| TEST (ProxyBypass, EmptyIsNotDefined) | |
| RC_ASSERT (proxy_bypass.defined()) | |
| TEST (ProxyBypass, EmptyStringRepresentation) | |
| from_json | from_json (proxy_bypass_as_json, title) |
| TEST (ProxyAutoConfigURL, EmptyIsNotDefined) | |
| RC_ASSERT (proxy_autoconfig_url.defined()) | |
| TEST (ProxyAutoConfigURL, EmptyStringRepresentation) | |
| from_json | from_json (proxy_autoconfig_url_as_json, title) |
| TEST (ProxyHostPort, EmptyIsNotDefined) | |
| RC_ASSERT (proxy_host_port.defined()) | |
| TEST (ProxyHostPort, EmptyStringRepresentationReturnsDefaultPort) | |
| from_json | from_json (proxy_host_port_as_json, title) |
| TEST (WINSServer, EmptyStringRepresentation) | |
| RC_ASSERT (wins_server.to_string()==address) | |
| RC_ASSERT_THROWS_AS (wins_server.validate(title), openvpn::IP::ip_exception) | |
| from_json | from_json (wins_server_as_json, title) |
| RC_ASSERT (tbc->tun_builder_set_remote_address(address, ipv6)) | |
| RC_ASSERT (tbc->remote_address.address==address) | |
| RC_ASSERT (tbc->tun_builder_add_address(address, prefix_length, gateway, ipv6, net30)) | |
| RC_ASSERT (vpn_address->address==address) | |
| RC_ASSERT (tbc->tun_builder_reroute_gw(ipv4, ipv6, flags)) | |
| RC_ASSERT (tbc->reroute_gw.ipv4==ipv4) | |
| RC_ASSERT (tbc->tun_builder_set_route_metric_default(metric)) | |
| RC_ASSERT (tbc->route_metric_default==metric) | |
| RC_ASSERT (tbc->tun_builder_add_route(address, prefix_length, metric, ipv6)) | |
| RC_ASSERT (added_route.address==address) | |
| RC_ASSERT (excluded_route.address==address) | |
| server addresses | push_back ({address, port}) |
| const TunBuilderCapture::Ptr | tbc (new TunBuilderCapture) |
| RC_ASSERT (tbc->tun_builder_set_dns_options(dns_options)) | |
| RC_ASSERT (tbc->dns_options.search_domains.back().domain==search_domain) | |
| RC_ASSERT (tbc->dns_options.servers.at(0).addresses.back().address==address) | |
| RC_ASSERT (tbc->tun_builder_set_layer(layer)) | |
| RC_ASSERT (tbc->layer.value()==layer) | |
| RC_ASSERT (tbc->tun_builder_set_mtu(mtu)) | |
| RC_ASSERT (tbc->tun_builder_set_session_name(session_name)) | |
| RC_ASSERT (tbc->tun_builder_add_proxy_bypass(bypass_host)) | |
| RC_ASSERT (tbc->proxy_bypass.back().bypass_host==bypass_host) | |
| RC_ASSERT (tbc->tun_builder_set_proxy_auto_config_url(url)) | |
| RC_ASSERT (tbc->proxy_auto_config_url.url==url) | |
| RC_ASSERT (tbc->tun_builder_set_proxy_http(host, port)) | |
| RC_ASSERT (tbc->http_proxy.host==host) | |
| RC_ASSERT (tbc->https_proxy.host==host) | |
| RC_ASSERT (tbc->tun_builder_add_wins_server(address)) | |
| RC_ASSERT (tbc->wins_servers.back().address==address) | |
| RC_ASSERT (tbc->tun_builder_set_allow_family(allow_family, allow)) | |
| if (allow_family==AF_INET) | |
| RC_ASSERT (tbc->tun_builder_set_allow_local_dns(allow)) | |
| RC_ASSERT_FALSE (tbc->block_outside_dns==allow) | |
| RC_ASSERT (tbc->tun_builder_add_address(address, prefix_length, gateway, !ipv6, net30)) | |
| RC_ASSERT_FALSE (tbc->tunnel_addresses.empty()) | |
| RC_ASSERT (tbc->tunnel_address_index_ipv4 > -1) | |
| tbc | reset_tunnel_addresses () |
| RC_ASSERT (tbc->tunnel_addresses.empty()) | |
| RC_ASSERT_FALSE (tbc->dns_options.to_string().empty()) | |
| tbc | reset_dns_options () |
| RC_ASSERT (tbc->dns_options.to_string()=="Values from dhcp-options: false\n") | |
| RC_ASSERT (tbc->vpn_ipv4()==nullptr) | |
| RC_ASSERT (tbc->tun_builder_add_address(address, prefix_length, gateway, false, net30)) | |
| RC_ASSERT (tbc->tun_builder_add_address(address, prefix_length, gateway, true, net30)) | |
| RC_ASSERT (tbc->vpn_ip(IP::Addr::UNSPEC)==nullptr) | |
| os<< "Session Name: "<< tbc-> session_name<< '\n';os<< "Layer: "<< tbc-> layer | str ()<< '\n' |
| os<< "Remote Address: "<< tbc-> remote_address | to_string ()<< '\n' |
| check (model, sut, rc::state::gen::execOneOfWithArgs< SetRemoteAddress, AddAddress, RerouteGW, SetRouteMetricDefault, AddRoute, ExcludeRoute, SetDNSOptions, SetLayer, SetMTU, SetSessionName, AddProxyBypass, SetProxyAutoConfigURL, SetProxyHTTP, SetProxyHTTPS, AddWINSServer, SetAllowFamily, SetAllowLocalDNS, ResetTunnelAddresses, ResetDNSOptions, VPN_IPv4, VPN_IPv6, VPN_IP >()) | |
Variables | |
| TunBuilderCapture::RemoteAddress | remote_address |
| remote_address | address = address |
| remote_address | ipv6 = true |
| const auto | address_as_json = remote_address.to_json() |
| TunBuilderCapture::RemoteAddress | from_json |
| const Json::Value | invalid_json |
| reroute_gw | ipv4 = ipv4 |
| reroute_gw | flags = flags |
| std::string | ret = "[ " |
| const std::string | ipv4_and_ipv6_return_string = {"IPv4=" + std::to_string(ipv4) + " IPv6=" + std::to_string(ipv6) + " "} |
| const auto | reroute_gw_as_json = reroute_gw.to_json() |
| TunBuilderCapture::ProxyBypass | proxy_bypass |
| proxy_bypass | bypass_host = bypass_host |
| const auto | proxy_bypass_as_json = proxy_bypass.to_json() |
| TunBuilderCapture::ProxyAutoConfigURL | proxy_autoconfig_url |
| proxy_autoconfig_url | url = url |
| const auto | proxy_autoconfig_url_as_json = proxy_autoconfig_url.to_json() |
| TunBuilderCapture::ProxyHostPort | proxy_host_port |
| proxy_host_port | host = host |
| proxy_host_port | port = port |
| const auto | proxy_host_port_as_json = proxy_host_port.to_json() |
| const auto | wins_server_as_json = wins_server.to_json() |
| const auto | ip_version = ipv6 ? IP::Addr::V6 : IP::Addr::V4 |
| const TunBuilderCapture::RouteAddress * | vpn_address = tbc->vpn_ip(ip_version) |
| const auto | metric = *rc::gen::positive<int>().as("Valid route metric") |
| const auto & | added_route = tbc->add_routes.back() |
| const auto & | excluded_route = tbc->exclude_routes.back() |
| DnsOptions | dns_options = {} |
| dns_options | servers [0] = std::move(server) |
| dns_options | search_domains = {{search_domain}} |
| const auto | layer = *rc::gen::element(3, 2, 0).as("Layer - 3, 2 or 0") |
| const auto | allow_family = *rc::gen::element(AF_INET, AF_INET6).as("Allow family - AF_INET or AF_INET6") |
| else | |
| std::ostringstream | os = {} |
| os<< "Block IPv4: "<<(tbc->block_ipv4 ? "yes" :"no")<< '\n';os<< "Block IPv6: "<<(tbc->block_ipv6 ? "yes" :"no")<< '\n';os<< "Block local DNS: "<<(tbc->block_outside_dns ? "yes" :"no")<< '\n';os<< "Add Routes:\n";os<< "Exclude Routes:\n";RC_ASSERT(tbc->to_string()==os.str());}struct TunBuilderCaptureModel{ std::string session_name;int mtu{0};Layer layer{Layer::OSI_LAYER_3};TunBuilderCapture::RemoteAddress remote_address{};std::vector< TunBuilderCapture::RouteAddress > | tunnel_addresses |
| int | tunnel_address_index_ipv4 {-1} |
| int | tunnel_address_index_ipv6 {-1} |
| TunBuilderCapture::RerouteGW | reroute_gw {} |
| bool | block_ipv4 {false} |
| bool | block_ipv6 {false} |
| bool | block_outside_dns {false} |
| int | route_metric_default {-1} |
| std::vector< TunBuilderCapture::Route > | add_routes |
| std::vector< TunBuilderCapture::Route > | exclude_routes |
| TunBuilderCapture::ProxyAutoConfigURL | proxy_auto_config_url {} |
| TunBuilderCapture::ProxyHostPort | http_proxy {} |
| TunBuilderCapture::ProxyHostPort | https_proxy {} |
| std::vector< TunBuilderCapture::WINSServer > | wins_servers {} |
| static constexpr auto | mtu_ipv4_maximum {65'535} |
| TunBuilderCapture | sut {} |
| check | ( | model | , |
| sut | , | ||
| rc::state::gen::execOneOfWithArgs< SetRemoteAddress, AddAddress, RerouteGW, SetRouteMetricDefault, AddRoute, ExcludeRoute, SetDNSOptions, SetLayer, SetMTU, SetSessionName, AddProxyBypass, SetProxyAutoConfigURL, SetProxyHTTP, SetProxyHTTPS, AddWINSServer, SetAllowFamily, SetAllowLocalDNS, ResetTunnelAddresses, ResetDNSOptions, VPN_IPv4, VPN_IPv6, VPN_IP > | () | ||
| ) |
| from_json from_json | ( | address_as_json | , |
| title | |||
| ) |
| from_json from_json | ( | invalid_json | , |
| title | |||
| ) |
| from_json from_json | ( | proxy_autoconfig_url_as_json | , |
| title | |||
| ) |
| from_json from_json | ( | proxy_bypass_as_json | , |
| title | |||
| ) |
| from_json from_json | ( | proxy_host_port_as_json | , |
| title | |||
| ) |
| from_json from_json | ( | reroute_gw_as_json | , |
| title | |||
| ) |
| from_json from_json | ( | wins_server_as_json | , |
| title | |||
| ) |
| if | ( | allow_family | = = AF_INET | ) |
Definition at line 1001 of file test_capture.cpp.
| if | ( | flags &RedirectGatewayFlags::RG_AUTO_LOCAL | ) |
| if | ( | flags &RedirectGatewayFlags::RG_BLOCK_LOCAL | ) |
| if | ( | flags &RedirectGatewayFlags::RG_BYPASS_DHCP | ) |
| if | ( | flags &RedirectGatewayFlags::RG_BYPASS_DNS | ) |
| if | ( | flags &RedirectGatewayFlags::RG_DEF1 | ) |
| if | ( | flags &RedirectGatewayFlags::RG_ENABLE | ) |
| if | ( | flags &RedirectGatewayFlags::RG_IPv4 | ) |
| if | ( | flags &RedirectGatewayFlags::RG_IPv6 | ) |
| if | ( | flags &RedirectGatewayFlags::RG_LOCAL | ) |
| if | ( | flags &RedirectGatewayFlags::RG_REROUTE_GW | ) |
| RC_ASSERT | ( | added_route. | address = =address | ) |
| RC_ASSERT | ( | excluded_route. | address = =address | ) |
| RC_ASSERT | ( | from_json. | ipv6 = =ipv6 | ) |
| RC_ASSERT | ( | proxy_autoconfig_url. | defined() | ) |
| RC_ASSERT | ( | proxy_bypass. | defined() | ) |
| RC_ASSERT | ( | proxy_host_port. | defined() | ) |
| RC_ASSERT | ( | remote_address. | defined() | ) |
| RC_ASSERT | ( | reroute_gw. | to_string() = =ipv4_and_ipv6_return_string+"flags="+ret | ) |
| RC_ASSERT | ( | tbc->dns_options.search_domains.back(). | domain = =search_domain | ) |
| RC_ASSERT | ( | tbc->dns_options. | to_string() = ="Values from dhcp-options: false\n" | ) |
| RC_ASSERT | ( | tbc->proxy_bypass.back(). | bypass_host = =bypass_host | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_add_addressaddress, prefix_length, gateway, !ipv6, net30 | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_add_addressaddress, prefix_length, gateway, false, net30 | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_add_addressaddress, prefix_length, gateway, ipv6, net30 | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_add_addressaddress, prefix_length, gateway, true, net30 | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_add_proxy_bypassbypass_host | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_add_routeaddress, prefix_length, metric, ipv6 | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_add_wins_serveraddress | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_reroute_gwipv4, ipv6, flags | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_allow_familyallow_family, allow | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_allow_local_dnsallow | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_dns_optionsdns_options | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_layerlayer | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_mtumtu | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_proxy_auto_config_urlurl | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_proxy_httphost, port | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_remote_addressaddress, ipv6 | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_route_metric_defaultmetric | ) |
| RC_ASSERT | ( | tbc-> | tun_builder_set_session_namesession_name | ) |
| RC_ASSERT | ( | tbc-> | tunnel_address_index_ipv4, |
| - | 1 | ||
| ) |
| RC_ASSERT | ( | tbc->tunnel_addresses. | empty() | ) |
| RC_ASSERT | ( | tbc-> | vpn_ipIP::Addr::UNSPEC = =nullptr | ) |
| RC_ASSERT | ( | tbc-> | vpn_ipv4() = =nullptr | ) |
| RC_ASSERT | ( | vpn_address-> | address = =address | ) |
| RC_ASSERT | ( | wins_server. | to_string() = =address | ) |
| RC_ASSERT_FALSE | ( | tbc-> | block_outside_dns = =allow | ) |
| RC_ASSERT_FALSE | ( | tbc->dns_options. | to_string).empty( | ) |
| RC_ASSERT_FALSE | ( | tbc->tunnel_addresses. | empty() | ) |
| RC_ASSERT_THROWS_AS | ( | from_json. | from_jsoninvalid_json, title, |
| json::json_parse | |||
| ) |
| RC_ASSERT_THROWS_AS | ( | from_json. | validatetitle, |
| openvpn::IP::ip_exception | |||
| ) |
| RC_ASSERT_THROWS_AS | ( | remote_address. | validatetitle, |
| openvpn::IP::ip_exception | |||
| ) |
| RC_ASSERT_THROWS_AS | ( | wins_server. | validatetitle, |
| openvpn::IP::ip_exception | |||
| ) |
| tbc reset_dns_options | ( | ) |
| tbc reset_tunnel_addresses | ( | ) |
| const TunBuilderCapture::Ptr tbc | ( | new | TunBuilderCapture | ) |
| TEST | ( | misc | , |
| capture | |||
| ) |
write_string(fn1, j1_txt);
Definition at line 12 of file test_capture.cpp.
| TEST | ( | ProxyAutoConfigURL | , |
| EmptyIsNotDefined | |||
| ) |
Definition at line 578 of file test_capture.cpp.
| TEST | ( | ProxyAutoConfigURL | , |
| EmptyStringRepresentation | |||
| ) |
Definition at line 592 of file test_capture.cpp.
| TEST | ( | ProxyBypass | , |
| EmptyIsNotDefined | |||
| ) |
Definition at line 486 of file test_capture.cpp.
| TEST | ( | ProxyBypass | , |
| EmptyStringRepresentation | |||
| ) |
Definition at line 500 of file test_capture.cpp.
| TEST | ( | ProxyHostPort | , |
| EmptyIsNotDefined | |||
| ) |
Definition at line 672 of file test_capture.cpp.
| TEST | ( | ProxyHostPort | , |
| EmptyStringRepresentationReturnsDefaultPort | |||
| ) |
Definition at line 686 of file test_capture.cpp.
| TEST | ( | RemoteAddress | , |
| EmptyIsNotDefined | |||
| ) |
Definition at line 72 of file test_capture.cpp.
| TEST | ( | RemoteAddress | , |
| EmptyStringRepresentation | |||
| ) |
Definition at line 86 of file test_capture.cpp.
| TEST | ( | RemoteAddress | , |
| EmptyStringRepresentationIncludesIPv6Setting | |||
| ) |
Definition at line 92 of file test_capture.cpp.
| TEST | ( | RerouteGW | , |
| EmptyStringRepresentationReturnsUnsetOptions | |||
| ) |
Definition at line 255 of file test_capture.cpp.
| TEST | ( | WINSServer | , |
| EmptyStringRepresentation | |||
| ) |
Definition at line 770 of file test_capture.cpp.
| os<< "Remote Address: "<< tbc-> remote_address to_string | ( | ) |
| from_json validate | ( | title | ) |
| std::vector<TunBuilderCapture::Route> add_routes |
Definition at line 1114 of file test_capture.cpp.
| const auto& added_route = tbc->add_routes.back() |
Definition at line 906 of file test_capture.cpp.
| wins_server address = address |
Definition at line 82 of file test_capture.cpp.
| const auto address_as_json = remote_address.to_json() |
Definition at line 158 of file test_capture.cpp.
| const auto allow_family = *rc::gen::element(AF_INET, AF_INET6).as("Allow family - AF_INET or AF_INET6") |
Definition at line 999 of file test_capture.cpp.
| bool block_ipv4 {false} |
Definition at line 1110 of file test_capture.cpp.
| bool block_ipv6 {false} |
Definition at line 1111 of file test_capture.cpp.
| bool block_outside_dns {false} |
Definition at line 1112 of file test_capture.cpp.
| proxy_bypass bypass_host = bypass_host |
Definition at line 496 of file test_capture.cpp.
| DnsOptions dns_options = {} |
Definition at line 928 of file test_capture.cpp.
| else |
Definition at line 1005 of file test_capture.cpp.
| std::vector<TunBuilderCapture::Route> exclude_routes |
Definition at line 1115 of file test_capture.cpp.
| const auto& excluded_route = tbc->exclude_routes.back() |
Definition at line 917 of file test_capture.cpp.
| from_json flags = flags |
Definition at line 266 of file test_capture.cpp.
| from_json from_json |
Definition at line 159 of file test_capture.cpp.
| from_json host = host |
Definition at line 682 of file test_capture.cpp.
| TunBuilderCapture::ProxyHostPort http_proxy {} |
Definition at line 1119 of file test_capture.cpp.
| TunBuilderCapture::ProxyHostPort https_proxy {} |
Definition at line 1120 of file test_capture.cpp.
| const Json::Value invalid_json |
Definition at line 245 of file test_capture.cpp.
| const auto ip_version = ipv6 ? IP::Addr::V6 : IP::Addr::V4 |
Definition at line 877 of file test_capture.cpp.
| from_json ipv4 = ipv4 |
Definition at line 264 of file test_capture.cpp.
| const std::string ipv4_and_ipv6_return_string = {"IPv4=" + std::to_string(ipv4) + " IPv6=" + std::to_string(ipv6) + " "} |
Definition at line 291 of file test_capture.cpp.
| from_json ipv6 = true |
Definition at line 109 of file test_capture.cpp.
| const auto layer = *rc::gen::element(3, 2, 0).as("Layer - 3, 2 or 0") |
Definition at line 940 of file test_capture.cpp.
| const auto metric = *rc::gen::positive<int>().as("Valid route metric") |
Definition at line 904 of file test_capture.cpp.
|
staticconstexpr |
Definition at line 1122 of file test_capture.cpp.
| os<< "Tunnel Addresses:\n" os<< "Reroute Gateway: "<< tbc-> reroute_gw to_string()<< '\n' = {} |
Definition at line 1086 of file test_capture.cpp.
| from_json port = port |
Definition at line 696 of file test_capture.cpp.
| TunBuilderCapture::ProxyAutoConfigURL proxy_auto_config_url {} |
Definition at line 1118 of file test_capture.cpp.
| TunBuilderCapture::ProxyAutoConfigURL proxy_autoconfig_url |
Definition at line 587 of file test_capture.cpp.
| const auto proxy_autoconfig_url_as_json = proxy_autoconfig_url.to_json() |
Definition at line 614 of file test_capture.cpp.
| std::vector< TunBuilderCapture::ProxyBypass > proxy_bypass |
Definition at line 495 of file test_capture.cpp.
| const auto proxy_bypass_as_json = proxy_bypass.to_json() |
Definition at line 522 of file test_capture.cpp.
| TunBuilderCapture::ProxyHostPort proxy_host_port |
Definition at line 681 of file test_capture.cpp.
| const auto proxy_host_port_as_json = proxy_host_port.to_json() |
Definition at line 709 of file test_capture.cpp.
| TunBuilderCapture::RemoteAddress remote_address |
Definition at line 81 of file test_capture.cpp.
| TunBuilderCapture::RerouteGW reroute_gw {} |
Definition at line 1109 of file test_capture.cpp.
| const auto reroute_gw_as_json = reroute_gw.to_json() |
Definition at line 298 of file test_capture.cpp.
| ret = "[ " |
Definition at line 268 of file test_capture.cpp.
| int route_metric_default {-1} |
Definition at line 1113 of file test_capture.cpp.
| dns_options search_domains = {{search_domain}} |
Definition at line 930 of file test_capture.cpp.
| dns_options servers = std::move(server) |
Definition at line 929 of file test_capture.cpp.
| TunBuilderCapture sut {} |
Definition at line 1812 of file test_capture.cpp.
| int tunnel_address_index_ipv4 {-1} |
Definition at line 1107 of file test_capture.cpp.
| int tunnel_address_index_ipv6 {-1} |
Definition at line 1108 of file test_capture.cpp.
| os<< "Block IPv4: " << (tbc->block_ipv4 ? "yes" : "no") << '\n'; os << "Block IPv6: " << (tbc->block_ipv6 ? "yes" : "no") << '\n'; os << "Block local DNS: " << (tbc->block_outside_dns ? "yes" : "no") << '\n'; os << "Add Routes:\n"; os << "Exclude Routes:\n"; RC_ASSERT(tbc->to_string() == os.str());}struct TunBuilderCaptureModel{ std::string session_name; int mtu{0}; Layer layer{Layer::OSI_LAYER_3}; TunBuilderCapture::RemoteAddress remote_address{}; std::vector<TunBuilderCapture::RouteAddress> tunnel_addresses |
Definition at line 1106 of file test_capture.cpp.
| from_json url = url |
Definition at line 588 of file test_capture.cpp.
| const TunBuilderCapture::RouteAddress * vpn_address = tbc->vpn_ip(ip_version) |
Definition at line 878 of file test_capture.cpp.
| const auto wins_server_as_json = wins_server.to_json() |
Definition at line 806 of file test_capture.cpp.
| std::vector<TunBuilderCapture::WINSServer> wins_servers {} |
Definition at line 1121 of file test_capture.cpp.