J2SE Proxy Authentication

后端 未结 4 1874
孤独总比滥情好
孤独总比滥情好 2021-01-01 06:12

We use 2 SIMILAR Microsoft ISA Proxy Server 2003 to connect to internet. Each Proxy has different Login style, as below :

Server-1 : nt-domain\\alan Server-2 : alan@

4条回答
  •  佛祖请我去吃肉
    2021-01-01 06:28

    The java documentation describes how to enable NTLM authentication in java. If you have access to source, you can programmatically add system properties as described in "proxy" article, adding something as follows (see also discussion of axis2):

    System.setProperty("http.auth.ntlm.domain", mydomain);
    

    If you have no access to source, you can set properties on the command line that launches your java binary, adding something like:

    java -DproxyHost=host  -DproxyPort=8080  -Dhttp.auth.ntlm.domain=mydomain  ...
    

提交回复
热议问题