title: Set up proxy on selenium geckodriver
body: <p>I'm having issues adding proxy support to my geckodriver selenium program.</p>
  
  <pre><code>                var proxy = new Proxy();
  
              if (useproxies == true)
              {
                  if (proxytype) //True = SOCKS5
                  {
                      /*var proxy = proxies[proxyindex];
                      profile.SetPreference("network.proxy.type", 1);
                      profile.SetPreference("network.proxy.socks", proxy.Split(':')[0]);
                      profile.SetPreference("network.proxy.socks_port", proxy.Split(':')[1]);
                      */
                      proxy.SocksProxy = proxies[proxyindex];
                      if (proxyindex &gt;= (proxies.Count - 1)) { proxyindex = 0; } else { proxyindex++; }
                  }
                  else //False = HTTP
                  {
                      proxy.HttpProxy = proxies[proxyindex];
                      if (proxyindex &gt;= (proxies.Count - 1)) { proxyindex = 0; } else { proxyindex++; }
                  }
              }
              //user agent
              profile.SetPreference("general.useragent.override", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0");
  
              //start
              options.Proxy = proxy;
              options.Profile = profile;
              driver = new FirefoxDriver(options);
  </code></pre>
  
  <p>But this isn't working, I already tried a lot of ways, but none is working for me. Anyone knows how to do this? First time working with geckodriver, I always use chromedriver.</p>
  
  <p>EDIT: In answer to @AtachiShadow , the issue remains.</p>
  
  <pre><code>                var profile = new FirefoxProfile();
              var options = new FirefoxOptions();
  
              //proxy
              if (useproxies == true)
              {
                  if (proxytype) //True = SOCKS5 | False = HTTP
                  {
                      try
                      {
                          profile.SetPreference("network.proxy.type", 1);
                          profile.SetPreference("network.proxy.socks", proxies[proxyindex].Split(':')[0]);
                          profile.SetPreference("network.proxy.socks_port", proxies[proxyindex].Split(':')[1]);
                          profile.SetPreference("network.proxy.socks_version", 5);
                          if (proxyindex &gt;= (proxies.Count - 1)) { proxyindex = 0; } else { proxyindex++; }
                      }
                      catch
                      {
                          WriteConsole("Proxies.txt is bad... Exiting.");
                          Console.Read();
                          Environment.Exit(0);
                      }
                  }
                  else
                  {
                      try
                      {
                        if (proxyindex &gt;= (proxies.Count - 1)) { proxyindex = 0; } else { proxyindex++; }
                      }
                      catch
                      {
                          WriteConsole("Proxies.txt is bad... Exiting.");
                          Console.Read();
                          Environment.Exit(0);
                      }
                  }
  
              }
              //user agent
              profile.SetPreference("general.useragent.override", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0");
  
              //start
              options.Profile = profile;
              driver = new FirefoxDriver(options);
  </code></pre>
  
  <p>Same issue with your sugestion</p>