@Test public void shouldThrowIllegalArgumentExceptionForInvalidForwardHttpProxy() { exception.expect(IllegalArgumentException.class); exception.expectMessage(containsString("Invalid forwardHttpProxy property must include <host>:<port> for example \"127.0.0.1:1090\" or \"localhost:1090\"")); forwardHttpProxy("abc.def"); }
public static InetSocketAddress forwardHttpProxy() { return readInetSocketAddressProperty(MOCKSERVER_FORWARD_HTTP_PROXY, "MOCKSERVER_FORWARD_HTTP_PROXY"); }
ConfigurationProperties { public static InetSocketAddress forwardHttpProxy() { return readInetSocketAddressProperty(MOCKSERVER_FORWARD_HTTP_PROXY, "MOCKSERVER_FORWARD_HTTP_PROXY"); } }
ConfigurationProperties { public static InetSocketAddress forwardHttpProxy() { return readInetSocketAddressProperty(MOCKSERVER_FORWARD_HTTP_PROXY, "MOCKSERVER_FORWARD_HTTP_PROXY"); }  }
ConfigurationProperties { public static InetSocketAddress forwardHttpProxy() { return readInetSocketAddressProperty(MOCKSERVER_FORWARD_HTTP_PROXY, "MOCKSERVER_FORWARD_HTTP_PROXY"); }  static int defaultMaxExpectations(); static void defaultMaxExpectations(int defaultMaxExpectations); static int maxExpectations(); static void maxExpectations(int count); static int defaultMaxLogEntries(); static void defaultMaxLogEntries(int defaultMaxLogEntries); static int maxLogEntries(); static void maxLogEntries(int count); static int ringBufferSize(); static boolean outputMemoryUsageCsv(); static void outputMemoryUsageCsv(boolean enable); static String memoryUsageCsvDirectory(); static void memoryUsageCsvDirectory(String directory); static int maxWebSocketExpectations(); static void maxWebSocketExpectations(int count); static int maxInitialLineLength(); static void maxInitialLineLength(int length); static int maxHeaderSize(); static void maxHeaderSize(int size); static int maxChunkSize(); static void maxChunkSize(int size); static int nioEventLoopThreadCount(); static void nioEventLoopThreadCount(int count); static int actionHandlerThreadCount(); static void actionHandlerThreadCount(int count); static int webSocketClientEventLoopThreadCount(); static void webSocketClientEventLoopThreadCount(int count); static long maxSocketTimeout(); static void maxSocketTimeout(long milliseconds); static long maxFutureTimeout(); static void maxFutureTimeout(long milliseconds); static int socketConnectionTimeout(); static void socketConnectionTimeout(int milliseconds); static void alwaysCloseSocketConnections(boolean alwaysClose); static boolean alwaysCloseSocketConnections(); static String sslCertificateDomainName(); static void sslCertificateDomainName(String domainName); @SuppressWarnings("UnstableApiUsage") static void addSubjectAlternativeName(String host); static String[] sslSubjectAlternativeNameDomains(); static void addSslSubjectAlternativeNameDomains(String... additionalSubjectAlternativeNameDomains); static void clearSslSubjectAlternativeNameDomains(); @SuppressWarnings("unused") static boolean containsSslSubjectAlternativeName(String domainOrIp); static String[] sslSubjectAlternativeNameIps(); static void addSslSubjectAlternativeNameIps(String... additionalSubjectAlternativeNameIps); static void clearSslSubjectAlternativeNameIps(); static boolean rebuildTLSContext(); static void rebuildTLSContext(boolean rebuildTLSContext); static boolean rebuildServerTLSContext(); static void rebuildServerTLSContext(boolean rebuildServerTLSContext); static void useBouncyCastleForKeyAndCertificateGeneration(boolean enable); static boolean useBouncyCastleForKeyAndCertificateGeneration(); static void preventCertificateDynamicUpdate(boolean prevent); static boolean preventCertificateDynamicUpdate(); static String certificateAuthorityPrivateKey(); static void certificateAuthorityPrivateKey(String certificateAuthorityPrivateKey); static String certificateAuthorityCertificate(); static void certificateAuthorityCertificate(String certificateAuthorityCertificate); static boolean dynamicallyCreateCertificateAuthorityCertificate(); static void dynamicallyCreateCertificateAuthorityCertificate(boolean enable); static String directoryToSaveDynamicSSLCertificate(); static void directoryToSaveDynamicSSLCertificate(String directoryToSaveDynamicSSLCertificate); static String privateKeyPath(); static void privateKeyPath(String privateKeyPath); static String x509CertificatePath(); static void x509CertificatePath(String x509CertificatePath); static boolean tlsMutualAuthenticationRequired(); static void tlsMutualAuthenticationRequired(boolean enable); static String tlsMutualAuthenticationCertificateChain(); static void tlsMutualAuthenticationCertificateChain(String trustCertificateChain); static ForwardProxyTLSX509CertificatesTrustManager forwardProxyTLSX509CertificatesTrustManagerType(); static void forwardProxyTLSX509CertificatesTrustManagerType(String trustManagerType); static String forwardProxyTLSCustomTrustX509Certificates(); static void forwardProxyTLSCustomTrustX509Certificates(String customX509Certificates); static String forwardProxyPrivateKey(); static void forwardProxyPrivateKey(String privateKey); static String forwardProxyCertificateChain(); static void forwardProxyCertificateChain(String certificateChain); static Level logLevel(); static String javaLoggerLogLevel(); static void logLevel(String level); static boolean disableSystemOut(); static void disableSystemOut(boolean disable); static boolean detailedMatchFailures(); static void detailedMatchFailures(boolean enable); static boolean launchUIForLogLevelDebug(); static void launchUIForLogLevelDebug(boolean enable); static boolean matchersFailFast(); static void matchersFailFast(boolean enable); static boolean metricsEnabled(); static void metricsEnabled(boolean enable); static String localBoundIP(); @SuppressWarnings("UnstableApiUsage") static void localBoundIP(String localBoundIP); static boolean attemptToProxyIfNoMatchingExpectation(); static void attemptToProxyIfNoMatchingExpectation(boolean enable); @Deprecated static InetSocketAddress httpProxy(); @Deprecated static void httpProxy(String hostAndPort); @Deprecated static InetSocketAddress httpsProxy(); @Deprecated static void httpsProxy(String hostAndPort); @Deprecated static InetSocketAddress socksProxy(); @Deprecated static void socksProxy(String hostAndPort); static InetSocketAddress forwardHttpProxy(); static void forwardHttpProxy(String hostAndPort); static InetSocketAddress forwardHttpsProxy(); static void forwardHttpsProxy(String hostAndPort); static InetSocketAddress forwardSocksProxy(); static void forwardSocksProxy(String hostAndPort); static String forwardProxyAuthenticationUsername(); static void forwardProxyAuthenticationUsername(String forwardProxyAuthenticationUsername); static String forwardProxyAuthenticationPassword(); static void forwardProxyAuthenticationPassword(String forwardProxyAuthenticationPassword); static String proxyAuthenticationRealm(); static void proxyAuthenticationRealm(String proxyAuthenticationRealm); static String proxyAuthenticationUsername(); static void proxyAuthenticationUsername(String proxyAuthenticationUsername); static String proxyAuthenticationPassword(); static void proxyAuthenticationPassword(String proxyAuthenticationPassword); static String initializationClass(); static void initializationClass(String initializationClass); static String initializationJsonPath(); static void initializationJsonPath(String initializationJsonPath); static boolean watchInitializationJson(); static void watchInitializationJson(boolean enable); static boolean persistExpectations(); static void persistExpectations(boolean enable); static String persistedExpectationsPath(); static void persistedExpectationsPath(String persistedExpectationsPath); static boolean enableCORSForAPI(); static boolean enableCORSForAPIHasBeenSetExplicitly(); static void enableCORSForAPI(boolean enable); static boolean enableCORSForAllResponses(); static void enableCORSForAllResponses(boolean enable); static String corsAllowHeaders(); static void corsAllowHeaders(String corsAllowHeaders); static String corsAllowMethods(); static void corsAllowMethods(String corsAllowMethods); static boolean corsAllowCredentials(); static void corsAllowCredentials(boolean allow); static int corsMaxAgeInSeconds(); static void corsMaxAgeInSeconds(int ageInSeconds); static String livenessHttpGetPath(); static void livenessHttpGetPath(String livenessPath); }
ConfigurationProperties { public static InetSocketAddress forwardHttpProxy() { return readInetSocketAddressProperty(MOCKSERVER_FORWARD_HTTP_PROXY, "MOCKSERVER_FORWARD_HTTP_PROXY"); }  static int defaultMaxExpectations(); static void defaultMaxExpectations(int defaultMaxExpectations); static int maxExpectations(); static void maxExpectations(int count); static int defaultMaxLogEntries(); static void defaultMaxLogEntries(int defaultMaxLogEntries); static int maxLogEntries(); static void maxLogEntries(int count); static int ringBufferSize(); static boolean outputMemoryUsageCsv(); static void outputMemoryUsageCsv(boolean enable); static String memoryUsageCsvDirectory(); static void memoryUsageCsvDirectory(String directory); static int maxWebSocketExpectations(); static void maxWebSocketExpectations(int count); static int maxInitialLineLength(); static void maxInitialLineLength(int length); static int maxHeaderSize(); static void maxHeaderSize(int size); static int maxChunkSize(); static void maxChunkSize(int size); static int nioEventLoopThreadCount(); static void nioEventLoopThreadCount(int count); static int actionHandlerThreadCount(); static void actionHandlerThreadCount(int count); static int webSocketClientEventLoopThreadCount(); static void webSocketClientEventLoopThreadCount(int count); static long maxSocketTimeout(); static void maxSocketTimeout(long milliseconds); static long maxFutureTimeout(); static void maxFutureTimeout(long milliseconds); static int socketConnectionTimeout(); static void socketConnectionTimeout(int milliseconds); static void alwaysCloseSocketConnections(boolean alwaysClose); static boolean alwaysCloseSocketConnections(); static String sslCertificateDomainName(); static void sslCertificateDomainName(String domainName); @SuppressWarnings("UnstableApiUsage") static void addSubjectAlternativeName(String host); static String[] sslSubjectAlternativeNameDomains(); static void addSslSubjectAlternativeNameDomains(String... additionalSubjectAlternativeNameDomains); static void clearSslSubjectAlternativeNameDomains(); @SuppressWarnings("unused") static boolean containsSslSubjectAlternativeName(String domainOrIp); static String[] sslSubjectAlternativeNameIps(); static void addSslSubjectAlternativeNameIps(String... additionalSubjectAlternativeNameIps); static void clearSslSubjectAlternativeNameIps(); static boolean rebuildTLSContext(); static void rebuildTLSContext(boolean rebuildTLSContext); static boolean rebuildServerTLSContext(); static void rebuildServerTLSContext(boolean rebuildServerTLSContext); static void useBouncyCastleForKeyAndCertificateGeneration(boolean enable); static boolean useBouncyCastleForKeyAndCertificateGeneration(); static void preventCertificateDynamicUpdate(boolean prevent); static boolean preventCertificateDynamicUpdate(); static String certificateAuthorityPrivateKey(); static void certificateAuthorityPrivateKey(String certificateAuthorityPrivateKey); static String certificateAuthorityCertificate(); static void certificateAuthorityCertificate(String certificateAuthorityCertificate); static boolean dynamicallyCreateCertificateAuthorityCertificate(); static void dynamicallyCreateCertificateAuthorityCertificate(boolean enable); static String directoryToSaveDynamicSSLCertificate(); static void directoryToSaveDynamicSSLCertificate(String directoryToSaveDynamicSSLCertificate); static String privateKeyPath(); static void privateKeyPath(String privateKeyPath); static String x509CertificatePath(); static void x509CertificatePath(String x509CertificatePath); static boolean tlsMutualAuthenticationRequired(); static void tlsMutualAuthenticationRequired(boolean enable); static String tlsMutualAuthenticationCertificateChain(); static void tlsMutualAuthenticationCertificateChain(String trustCertificateChain); static ForwardProxyTLSX509CertificatesTrustManager forwardProxyTLSX509CertificatesTrustManagerType(); static void forwardProxyTLSX509CertificatesTrustManagerType(String trustManagerType); static String forwardProxyTLSCustomTrustX509Certificates(); static void forwardProxyTLSCustomTrustX509Certificates(String customX509Certificates); static String forwardProxyPrivateKey(); static void forwardProxyPrivateKey(String privateKey); static String forwardProxyCertificateChain(); static void forwardProxyCertificateChain(String certificateChain); static Level logLevel(); static String javaLoggerLogLevel(); static void logLevel(String level); static boolean disableSystemOut(); static void disableSystemOut(boolean disable); static boolean detailedMatchFailures(); static void detailedMatchFailures(boolean enable); static boolean launchUIForLogLevelDebug(); static void launchUIForLogLevelDebug(boolean enable); static boolean matchersFailFast(); static void matchersFailFast(boolean enable); static boolean metricsEnabled(); static void metricsEnabled(boolean enable); static String localBoundIP(); @SuppressWarnings("UnstableApiUsage") static void localBoundIP(String localBoundIP); static boolean attemptToProxyIfNoMatchingExpectation(); static void attemptToProxyIfNoMatchingExpectation(boolean enable); @Deprecated static InetSocketAddress httpProxy(); @Deprecated static void httpProxy(String hostAndPort); @Deprecated static InetSocketAddress httpsProxy(); @Deprecated static void httpsProxy(String hostAndPort); @Deprecated static InetSocketAddress socksProxy(); @Deprecated static void socksProxy(String hostAndPort); static InetSocketAddress forwardHttpProxy(); static void forwardHttpProxy(String hostAndPort); static InetSocketAddress forwardHttpsProxy(); static void forwardHttpsProxy(String hostAndPort); static InetSocketAddress forwardSocksProxy(); static void forwardSocksProxy(String hostAndPort); static String forwardProxyAuthenticationUsername(); static void forwardProxyAuthenticationUsername(String forwardProxyAuthenticationUsername); static String forwardProxyAuthenticationPassword(); static void forwardProxyAuthenticationPassword(String forwardProxyAuthenticationPassword); static String proxyAuthenticationRealm(); static void proxyAuthenticationRealm(String proxyAuthenticationRealm); static String proxyAuthenticationUsername(); static void proxyAuthenticationUsername(String proxyAuthenticationUsername); static String proxyAuthenticationPassword(); static void proxyAuthenticationPassword(String proxyAuthenticationPassword); static String initializationClass(); static void initializationClass(String initializationClass); static String initializationJsonPath(); static void initializationJsonPath(String initializationJsonPath); static boolean watchInitializationJson(); static void watchInitializationJson(boolean enable); static boolean persistExpectations(); static void persistExpectations(boolean enable); static String persistedExpectationsPath(); static void persistedExpectationsPath(String persistedExpectationsPath); static boolean enableCORSForAPI(); static boolean enableCORSForAPIHasBeenSetExplicitly(); static void enableCORSForAPI(boolean enable); static boolean enableCORSForAllResponses(); static void enableCORSForAllResponses(boolean enable); static String corsAllowHeaders(); static void corsAllowHeaders(String corsAllowHeaders); static String corsAllowMethods(); static void corsAllowMethods(String corsAllowMethods); static boolean corsAllowCredentials(); static void corsAllowCredentials(boolean allow); static int corsMaxAgeInSeconds(); static void corsMaxAgeInSeconds(int ageInSeconds); static String livenessHttpGetPath(); static void livenessHttpGetPath(String livenessPath);  }