Looking for a C# headless browser with proxy and JavaScript capabilities

I’m working on a project that needs a headless browser in C#. Right now I’m using a simple one but it doesn’t have proxy support. This is causing some issues.

The browser only needs to handle basic JavaScript on webpages. I don’t need to change the site with JavaScript or anything fancy.

What I really need is:

  1. Headless browser
  2. Proxy support
  3. Basic JavaScript handling

Does anyone know a good solution for this? I’ve been searching but haven’t found the right fit yet. Any recommendations would be super helpful.

Thanks everyone!

I’ve had success using CefSharp for similar requirements. It’s a Chromium-based browser control for .NET that ticks all your boxes. Headless mode is supported, proxy configuration is straightforward, and it handles JavaScript well. The learning curve isn’t too steep, and there’s good documentation available.

One thing to note is that CefSharp can be a bit heavy on resources compared to some alternatives. However, its stability and feature set often outweigh this drawback. If you’re comfortable with Chromium, you’ll find CefSharp quite intuitive to work with.

Just ensure you’re using the latest stable version to avoid any compatibility issues with your C# environment.

Having worked on similar projects, I can recommend Selenium WebDriver with ChromeDriver in headless mode. It’s robust, well-documented, and meets all your requirements.

For proxy support, you can easily configure ChromeOptions to use a proxy server. The JavaScript handling is excellent, as it’s a full browser engine.

One caveat: setup can be a bit tricky at first. Make sure your ChromeDriver version matches your installed Chrome version.

If you need something lighter, PuppeteerSharp is worth considering. It’s a port of Puppeteer to .NET and offers good performance with a smaller footprint.

Both options have active communities, which is invaluable when you hit roadblocks. Hope this helps point you in the right direction!

hey liamj, have u tried puppeteerSharp? it’s pretty sweet for what ur looking for. supports headless mode, proxy setup, and handles javascript like a champ. plus its lightweight and easy to get going. might be worth checkin out if u haven’t already