Java Port #180
CrazyKidJack
started this conversation in
Ideas
Java Port
#180
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Questions
Description / Background
I actually have already sort of done it privately using Mozilla's Rhino JavaScript engine to evaluate both Mozilla's PAC parsing JavaScript implementations (the same ones you are already using) as well as some simple Java implementations of
myIpAddress()
,dnsResolve()
, andalert()
since those cannot be easily defined in JavaScript (which I suppose is why Mozilla didn't do it in the first place). My implementations of these functions are intended to mimic Mozilla's C++ implementations... but more simple because we are not executing these functions in the context of a browser (for example, asynchronous DNS resolution isn't really required I think).To be clear, I have not implemented this library's API functions yet, I have just privately created a class with a single
public static
function that will parse a PAC file and tell me the proxy it defines for a particular URL/HOST pair. My single public function basically encapsulates all of this libraries API calls into one because that's what I personally wanted for my project. However, if you are open to supporting such a port, I would of course implement this library's API functions for consistency.Beta Was this translation helpful? Give feedback.
All reactions