How to set username and password when using Proxy class for SOCKS5?

Hi all,
I use the proxy class for SOCKS5, so need to set username and password, I don't find where can I set the value. whether the API support it.
Thanks in advance!

System.getProperties().put("proxySet", "true");That does nothing. Remove.
System.getProperties().put("proxyHost", getProxyHost());
System.getProperties().put("proxyPort", getProxyPort());You should be setting socks.proxyHost and socks.proxyPort here.
System.setProperty("java.net.socks.username", getSOCKSUsername());
System.setProperty("java.net.socks.password", getSOCKSPassword());
Authenticator.setDefault(new ProxyAuth(getSOCKSUsername(), getSOCKSPassword()));You either need the first two lines or the third, not both. See the last link posted above.
1. After I set the value, I connect internet by proxy, how the proxy server knows the values?Because Java tells it during the SOCKS handshake.
2. In my app, I just set the values in the system properties, then JVM does remaining work? Remaining work is not concerned?Should be OK unless you have to connect to a different SOCKS proxy from the same JVM, but that kind of thing is problematic anyway due to the curious Authenticator design which is set globally, not per connection as you might expect.

Similar Messages

  • Can you set username and password when using OWA_UTIL.REDIRECT_URL?

    If you have a PSP that runs under a DAD that includes username and password and therefore doesn't require users to log in and you want it to do OWA_UTIL.REDIRECT_URL to another PSP that runs under another DAD that normally requires login using basic database authentication and the first PSP already "knows" the user's username and password, is there any way to use them to skip the login dialog of the second page? Maybe hack into the request and use UTL_HTTP.SET_AUTHENTICATION somehow...?

    That doesn't seem to work, and trying that kind of url directly from the browser says "invalid syntax error", so maybe Oracle appserver just doesn't let you do that.
    I got the idea of trying to add an authorization header:
    OWA_UTIL.MIME_HEADER(BCLOSE_HEADER => FALSE);
    HTP.P( 'Authorization: Basic mybase64encodedcredentials' );
    OWA_UTIL.REDIRECT_URL('myurl', FALSE);
    OWA_UTIL.HTTP_HEADER_CLOSE;
    ...but it didn't work either and with a little further thought I guess it's obvious why: any code here modifies the response header for this request, not the request header for the redirect.
    Message was edited by:
    psalmu

  • How to set username and password at line vty 0 4?

    hi guys,
    would like to know how i can set username and password so when i telnet to the router, i can login as username and password..?
    thks,
    ken

    Hi,
    for a simple telnet password with user name & password, find the steps below,
    aaa new-model
    username password
    line vty 0 4
    password
    login local
    if you wanted different types of users to login with different privilagez,do the following
    username privilege 15 password
    username privilege 5 password
    privilege exec level 15 conf t
    privilege exec level 5 show
    line vty 0 4
    password
    login local
    in the above statement "privilege exec level 15 "will have full access, "privilege exec level 5" will have the limited like "show" related
    hope this helps.
    rate this post if cleared.

  • How to set username and password for a tcode ?

    Dear Gurus,
              Greets..................
    Pls provide me solution for my scenario. My program is module pool program.It has been assigned by a Tcode.when the end user enter the tcode in command box,I should display a small screen with username and password(****).If username and password is correct,it should allow the end user to execute that particular tcode.If not i should display warning message that he is not eligible to access that program.
    Thanks & Regards.
    Raj

    Hi Raj,
    You can do this by creating a Login screen for the users and check the authentication of each user in PAI i.e. PROCESS AFTER INPUT.
    Store the user information in a database table and check the username and password when the user enters it.
    You can display password as *** also. For this double click on input box designed for password and goto Display tab. Select Invisible in the list and check it.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN <fcode for submit>.
          SELECT SINGLE uname pwd
           FROM <DB table>
           INTO (user, pass)
           WHERE username = user AND
                   password = passwd.
          IF sy-subrc = 0.
    <Go to next screen for further processing>
          ELSE.
    <Display Error message and exit>
          ENDIF.
      ENDCASE.
    Regards,
    Amit
    Message was edited by:
            Amit Kumar

  • How to set username and password before redirecting to a RESTful webservice

    I am a .Net developer who has developed a webservice used by my ColdFusion colleagues. They are using ColdFusion 9 but I'm not sure if they have incorporated any of the newer features of ColdFusion in their apps. Here is a snippet of how they have been invoking the webmethods:
    <cfscript>
                         ws = CreateObject("webservice", "#qTrim.webServiceName#");
                         ws.setUsername("#qTrim.trimAcct#");
                         ws.setPassword("#qTrim.trimpwd#");
                         wsString=ws.UploadFileCF("#qTrim.webserviceurl#","#objBinaryData#", "#qFiles.Filename#", "Document", "#MetaData#");
                </cfscript>
    As I understand things, the .setUsername and .setPassword correspond to the Windows credentials the CF Admin set when the URL of the .Net webservice was "registered" and given its "name" (for the CreateObject statement above). I have 4 webmethods that are all invoked in this manner and this SOAP protocol works adequately for us. Please note that this ColdFusion web app authenticates anonymous remote internet users by prompting for a username and password and compares them to an application database (i.e. Microsoft calls this "forms authentication"). Because only a few Windows domain accounts are authorized to call this .Net webservice, the above code always uses the same username/password constants and it all works.
    My question involves the newest webmethod added to the .Net webservice. It requires that callers must invoke it as a RESTful service which means it must be invoked by its URL. Here is a snippet of C# code that invokes it from an ASP.NET webclient:
                string r = txtRecordNumber.Text;
                string baseurl = "http://localhost/sdkTrimFileServiceASMX/FileService.asmx/DownloadFileCF?";
                StringBuilder url = new StringBuilder(baseurl);
                url.Append("trimURL="); url.Append(txtFakeURLParm.Text);
                url.Append("&");
                url.Append("TrimRecordNumber="); url.Append(txtRecordNumber.Text);
                Response.Redirect(url.ToString());
    I assume a ColdFusion script could easily build a full URL as above with appended querystring parameters and redirect. Is there some way for the CF code redirecting to a RESTful webservice (by way of its URL) to set the Username and Password to this Windows account mentioned above? When the DownloadFileCF webmethod is hit it must be with the credentials of this special Windows domain account. Can that be set by ColdFusion someway to mimic the result of the SOAP technique (the first snippet above).
    I hope my question is clear and someone can help me make suggestions to my ColdFusion colleagues. Thanks.

    Can you clarify what you mean by "establish a different Windows identity"?  Usually passing identity to a web site or service means adding something to the request's HTTP headers.  This could be a cookie in the case of .NET forms authentication or the "Authorization" header in the case of basic authentication.
    The SOAP web service invocation code you posted does use basic authentication, according to the CF docs "ColdFusion inserts the user name/password string in the authorization request header as a base64 binary encoded string, with a colon separating the user name and password. This method of passing the user name/password is compatible with the HTTP basic authentication mechanism used by web servers."
    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec13a13 -7fe0.html
    If you need to mimic the SOAP techinque you should have basic authentication enabled for your REST service endpoints.
    If your authentication method is different then CF developers will need to add the appropriate HTTP headers to their service calls.  Note that calling a REST service from CF would probably be accomplished using the CFHTTP tag if the service is designed to be consumed by the CF server.

  • How to give Username and password when calling HTTP page?

    I have this code when i run this I get credentials error. How to give credentials .The authentication is set to windows in the https page. Means pop up will appear to get the credentials
    declare
    req UTL_HTTP.REQ;
    resp UTL_HTTP.RESP;
    value varchar2(1024);
    p_url varchar2(4000);
    OPT varchar2(1000);
    BEGIN
    dbms_output.put_line('');
    p_url:='http://www.xyz.com/';
    dbms_output.put_line(p_url);
    req := UTL_HTTP.begin_REQUEST(p_url);
    utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
    resp := utl_http.get_response(req);
    loop
    utl_http.read_line(resp, value, true);
    dbms_output.put_line(value);
    end loop;
    exception
    when utl_http.end_of_body then
    utl_http.end_response(resp);
    END;
    When i run this i get
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
    <style type="text/css">

    Basic authentication is set using the UTL_HTTP.Set_Authentication() call.
    If you are using a proxy and need procy authentication, you can set the username and password for proxy access, as part of the proxy URL. E.g.
    utl_http.set_proxy( 'http://proxyuser:[email protected]', null );NTLM (Windows NT LAN Manager) authentication is proprietary and not part of the HTTP specifications. If that is needed, try and use the username and password as part of the URL - or do some research on how to manually perform NTLM authentication.
    If you are using HTTPS, you need an Oracle Wallet with that server's certificate (making it a trusted certificate), and then set/use the wallet using the UTL_HTTP.Set_Wallet() call. See sample code in {message:id=10820182}.

  • How to set Username and Password to a URLConnection?

    My applet is supposed to access a servlet that is only accessible when username and password are correct.
    I've made a URLConnection object to connect to the servlet, but the problem is that I don't know how to add the username and password details to this connection.
    Can anyone please help?
    Terry

    Does any one know how to do it?
    Please, it's quite urgent...
    And there's 10 DD as award if someone points me in the right direction, please help.

  • How to override private browsing and save the passwords all the time? How to save username and passwords when logged in no matter what?

    I have a smart kid that uses computer, he gets on to web sites but it doesnt save his passwords so i can see what he is doing. He might be using private browsing or saying never remember password. I went into custom settings and said always remember. It still asks so you can say no do not remember. I set master password too. What can i do?

    anyone?
    even if the answer is NO: u can't browse with private browsing in a new window because mozilla have though this will be too much freedom..... then at least it would be good to know!
    thanks

  • How set  UserName and Password for HTTP Basic Authentication for a servlet

    Hi..
    How set UserName and Password for HTTP Basic Authentication for a servlet in JBoss server?
    Using Tomcat i can do it .(By setting roles in web.xml, and user credintails in tomcat-user.xml).
    But i dont know how do it in JBOSS..
    I am using Netbeans and Eclipse IDEs.. Can we do it by using them also!?
    Thank u

    Hi Raj,
    You can do this by creating a Login screen for the users and check the authentication of each user in PAI i.e. PROCESS AFTER INPUT.
    Store the user information in a database table and check the username and password when the user enters it.
    You can display password as *** also. For this double click on input box designed for password and goto Display tab. Select Invisible in the list and check it.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN <fcode for submit>.
          SELECT SINGLE uname pwd
           FROM <DB table>
           INTO (user, pass)
           WHERE username = user AND
                   password = passwd.
          IF sy-subrc = 0.
    <Go to next screen for further processing>
          ELSE.
    <Display Error message and exit>
          ENDIF.
      ENDCASE.
    Regards,
    Amit
    Message was edited by:
            Amit Kumar

  • I signed up yesterday with synch. I dont know my password and I need it to reset a new password. Please advise how to set a new password when I dont know old 1

    I signed up yesterday with synch. I don't know my password and I need it to reset a new password. Please advise how to set a new password when I dont know old 1
    I set it up on my "upstairs computer" and then came to my "downstairs computer" to synch and I can not get into the account because of the above password problem. I write down my passwords. I must have mistyped it or mis written.
    I want to change my password

    The new Sync version uses the Firefox account and stores the login data (username/email and password) under the https://accounts.firefox.com site heading in the Password Manager and use the signedInUser.json file in the profile folder to store the credentials once connected to the account to avoid having to enter the master password on each start.

  • How can I specify SMTP Email Server userID and password when using Email VIs?

    How can I specify SMTP Email Server userID and password when using Email VIs included in Internet Toolkit?

    Hi,
    A similar question was posted on Discussion Forums soem time back. Please see the link below.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000C7B00000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    You would find the last post in the above thread quite useful where it has a link to OpenG code. I am also copying that link for your reference.
    http://www.openg.org/tiki/tiki-index.php?page=OpenG+Internet+Connectivity+Tools
    Please feel free to respond to this post with any questions/comments you may have.
    Regards,
    Ankita A.
    National Instruments

  • Prompt for username and password when executing servlet

    In Weblogic 5.1 when I set the username and password in weblogic.properties file, it prompts for the usertname and password when I execute the gatewayServlet
    weblogic.allow.execute.weblogic.servlet.servlets/gateway.administration=vijay
    weblogic.password.vijay=password
    But I guess this is not the way it can be implemented in 8.1. Please let me know how I can prompt for username and password when executing the servlet. I dont want it to be done programatically. Please let me know whether I can set anything on the properties file.
    Thanks
    Vijay Subramanian

    You can use Apache ACLs, http://httpd.apache.org/docs/1.3/howto/auth.html
    GoodEvening!
    I'm developing a web application using jsp
    technology.
    When the user digit:
    http://<machine address>:<port>/<applicationName>
    I would that a browser prompt login is diplayed to
    the user for enter him username and password,
    before loading the index.jsp page. Is possible
    without using awt or swing components?! using only
    the browser's prompt dialog?!
    p.s.
    sorry 4 my bad english! ;-)

  • How-to access username and password protected Java EE Web services from ADF

    The title of this post is exactly the same as this article by Frank Nimphius:
    http://www.oracle.com/technology/products/jdev/howtos/1013/protectedws/access_protected_web_services_from_adf.htm
    The article addresses the problem of securing web services using usernames and passwords, when those web services are accessed through a proxy or a data control. In the examples, the user names and passwords are specified, whether in the code or the definition of data controls. (SKING/SKING).
    In a very common scenario, users login to reach a page, for example, A.jspx, which contains a button that calls a web service, for example displayDate. Suppose that user has logged in by username/pass of (AHUNOLD/AHUNOLD) and AHUNOLD has access to the service and the page. Is there any way to pass the logged in user name and password to the webservice ? Of course we can hard-code the username in the data control definition or proxy code, but this is just one of the thousands of users who have access to the service and the authentication is not dynamic this way.
    Hope my question is clear. Wishing you all a great Christmas.
    Farbod

    Hi Frank, and happy new year.
    Are you implying that it couldn't be done declaratively? What is your suggestion for this problem? You know the problem... As I described:
    - I need to secure my web services, so when exposed, no one from inside network or the internet, can access the web service without proper permission
    - The web services are shown as web controls on jspx pages. The user has logged in before reaching the page. It is irrelevant to ask him to enter user name and password again.
    - I have user names, passwords and roles in Oracle Internet Directory (Identity Management). It provides some APIs and I can retrieve the usernames and attempt logging in programmically. But how can I get username and password from the session in ADF application?
    I guess using SAML or certificate could be the solution, but I have a problem with SAML, described here:
    Re: Webservices Security, SAML, and Identity Management (OID)
    Best Regards,
    Farbod

  • Word 2010 prompts for username and password when opening a document on trusted website

    Hi Guys,
    We have a website (not sure if the site is a sharepoint site) on our trusted domain that asked for username and password when trying to access it. I added the site to our trusted sites zone and this resolved the issue however when I try to open word documents
    I get prompted for usernames and password again if I cancel the credentials box the document opens with no issues. 
    Below is some of the steps i have taken
    - Tried opening other non office documents (e.g. PDF, JPEG) and they open with no issues
    - Tried to opening the word documents with a system that only had word pad install and not Office 2010 and the documents open with no issues so it looks like it's an office 2010 problem 
    Can you please advise how I can resolve this issue and if this is a client issue or an issue on the web server thanks

    Hi,
    This issue is caused by the Office suit itself. When Internet Explorer opens an Office document, the appropriate Office application is started with the path of the document. The Office application then tries to access the document directly from
    the server. This differs from other browsers and other file types. Most browsers download the file and call the application to open the file from the local cache. However, when this occurs, if the opened file is changed and saved,
    the changes are only made to the local copy and not to the server copy.
    To establish the richest experience possible, the first thing that the Office application does is communicate with the server to determine the server type and what web authoring protocol is available. The application does this by making
    an OPTIONS request directly to the server.
    As a new process accessing the server, the Office application is required to renegotiate authentication. This method is more secure than a method in which the new process uses an existing authentication that was established by the browser. 
    Please try the following methods:
    An alternative with full functionality but with a calculated risk
    Client approaches that can reduce the impact
    Alternative configurations when the web server does not support DAV or reduced functionality is acceptable
    For more detail information, please refer to the following link:
    http://support.microsoft.com/kb/2019105/en-us
    Thanks
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

  • How to pass username and password with the portal url

    i want to access portal from my web site. i have created username and password fields in my web page. when submited , my portal page should open. so how to pass username and password with the portal url.

    This is not straightforward; but it is doable.
    First tell us about your portal version; portal 10.1.4 has a slightly different method of doing it and the pre-10g portals were completely different animals.
    And if you are in AS Rel 2, then the most important document for you would probably be the following:
    [Creating Deployment Specific Pages| http://download-west.oracle.com/docs/cd/B14099_19/idmanage.1012/b14078/custom.htm#i1015535]
    You might want to use it in conjunction with some metalink notes about your portal version and such a login page.
    hope that helps!
    AMN

Maybe you are looking for

  • Why it takes a long time for my MacBook Air to turn on?

    I brought my MacBook Air at a Power Mac Center to fix vertical lines on the screen. The vertical lines were removed. But since then, when I turn on my laptop, it takes a long time before it actually turns on. Sometimes, after pressing the power butto

  • Select Single * is not fetching all Data

    Hi, I have a peculiar problem, when i am extending the customer to a new company code, we are getting Dump saying 'ASSERTION_FAILED' when i debugg i am geeting issue with following Code of a FM 'KNA1_SINGLE_READER' IF NOT i_bypassing_buffer IS INITIA

  • Scrolle button laptop doesn't work

    wie krijgt de scroll knop op mijn laptop weer op gang bij Firefox4? alvast mijn dank voor alle tips.

  • Cash Position (TS FF7A)

    Hi, I want to see in the TS FF7A (Cash postion) some SGL ind, for example the 'check' which I received befor sending to the bank.  I cannot do that, I can get that they appear in the FF7B (liquidity forecast) but I need they only appear in the 'Cash

  • IWeb RSS

    Hi I use iWeb '08 for my websites. I have a external website. I do not use apples servers for my hosting. I use godaddy now when I publish to a folder I enter my website name when it asks. When I upload it to my website I visit my website to see if e