// Copyright © 2017 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. namespace CefSharp { /// /// Proxy options /// public class ProxyOptions { /// /// The IP address for the proxy /// public string IP { get; private set; } /// /// The port for the proxy /// public string Port { get; private set; } /// /// The username for authentication /// public string Username { get; set; } /// /// The password for authentication /// public string Password { get; set; } /// /// The list of domains that shouldn't be affected by the proxy, Format: example.com;example2.com /// public string BypassList { get; private set; } /// /// Checks if username and password is set /// /// Returns true if both username and password is set, otherwise false public bool HasUsernameAndPassword() { return !string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password); } /// The IP address for the proxy /// The port for the proxy /// The username required for authentication /// The password required for authentication /// The list of domains that shouldn't be affected by the proxy, Format: example.com;example2.com public ProxyOptions(string ip, string port, string username = "", string password = "", string bypassList = "") { IP = ip; Port = port; Username = username; Password = password; BypassList = bypassList; } } }