Giter Site home page Giter Site logo

Comments (7)

mitchhentges avatar mitchhentges commented on May 24, 2024 1

Hey! 👋
Got two questions:

  • What are you using to VPN? Is it OpenVPN?
  • If you connect to your VPN, and you run Firefox or Chrome (without proxying through James), does it go through the VPN or go through the proxy?

Note: does James use the Windows system proxy in "Internet options"? FWIW, I frequently set that system proxy to point to James (localhost:1338), and James ignores it - my traffic doesn't loop in on itself. Instead, browser traffic gets sent to James, and James goes straight to the destination

from james.

asharron avatar asharron commented on May 24, 2024 1

Hey! I would like to have something like this too.

If you look at Charles, they have an option called external URL proxy settings where instead of Charles going straight to the destination, it routes it through whatever proxy url you give it. I'd like to have similar functionality for James since I am behind a corporate proxy that also requires authentication.

I wouldn't mind adding this functionality myself if you could give me a few pointers on how to get started. I'm pretty familiar with React + Redux, but not electron and how the project itself is setup.

from james.

mitchhentges avatar mitchhentges commented on May 24, 2024 1

That would be awesome asharron!
We have some docs for contributing, which should get you set up with a local build.

This feature might be a little tough to do, since you need to do:

  • Add a way in the UI to configure proxy
  • Get these configuration values from the UI process to the main process
  • Provide these values to hoxy, the proxy library we're using under-the-hood.

I'd recommend looking at the logic for throttling network speed to see how we've configured hoxy in other ways.

A PR would be fantastic and appreciated! Feel free to set up a fancy new draft PR and asking any questions you might run into :)

from james.

asharron avatar asharron commented on May 24, 2024 1

So as an update, I figured out to use an external proxy with Hoxy. You can use an option called upstreamProxy when creating the server. To test this out, I added it to the opts object you create in proxy,.js and it worked fine.

The problem for me, however, is that I need to use authentication in order to use the external proxy. So instead of using the typical host:port format, I need to use origin%5CUsername:Password@host:port which it looks like Hoxy doesn't support at the moment, at least judging by the options given in the docs.

I'm going to see if I can find a way to enable this. I may have to submit a PR there first before this feature gets incorporated in James.

I'll keep you updated if I find anything.

from james.

asharron avatar asharron commented on May 24, 2024 1

Hey, I ran into some issues when implementing this feature, and I am actually leaving the role that I was going to add this feature for.

Because of this, I don't think I will be finishing the feature.

For someone who is looking to implement this, basically you would need to make a pull request to hoxy that allows you to add proxy credentials when you specify and upstream proxy.

This was a bit tricky for me since it involved understanding how proxy requests work with http headers (and also because the hoxy code base is a bit difficult to understand).

Once hoxy has that feature in it, then James would have the feature as well. A menu could then be added to toggle the credentials for the upstream proxy (could even maybe just have a config file for starters until getting around to creating a React component for it).

Hope this helps someone and sorry for not figuring it out!

from james.

mhtvsSFrpHdE avatar mhtvsSFrpHdE commented on May 24, 2024

It was my mistake.
I did a test again and confirmed that James does connect directly instead of following system proxy.
This lead to another issue that,
if I want the James to connect directly and not to use VPN,
I have to disconnect the VPN first.

Just like the other mention,
a custom parent proxy would match the two case at the same time,
so can avoid repeat about connect and disconnect the VPN many times.

Although write scripts to manage VPN connection faster is not a bad idea.😅

from james.

mitchhentges avatar mitchhentges commented on May 24, 2024

Thanks for taking a look Alex!
This directions-for-next-dev comment is super awesome as well 💯 you're a champ.

Good luck in your new role!

from james.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.