How can I write a simple proxy server that intercept 80(www)socket???

Does any body knows how can i write simple proxy server that intercept web sites watching by user???thx

Does any body knows how can i write simple proxy
server that intercept web sites watching by user???thxTo be clear a proxy means that requests go to the proxy and then the proxy relays the request to proper place.
If you want to see traffic without being in the middle (the requests go direct) then you can not use the standard Java API. And do so in any situation of course requires that you be in the physical connection in the first place (ie in a star network with a router in the middle a client machine will not see packets from other machines.)

Similar Messages

  • How can I write to an OPC Server?

    Hello!
    I was busy a few days with LabVIEW 8 to finish a special task, but now I've got problems to solve the following problem:
    I have an OPC connection between a frequency converter and LabVIEW 8. With the example vi's I get the data out of the OPC Server (revolutions per minute).
    So I can read data out of the OPC Server, but how can I write? I want to write several voltage values to the OPC Server that the frequency converter gets the required revolutions per minute.
    Have you got any ideas? Are there existing example vi's to write data to an OPC Server?
    Best regards and Thanks in advance!

    So here it is - a little bit modified, but you should get the idea out of it.
    If you have questions, I'll try to answer them .
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    IOControl.llb ‏168 KB

  • How can I set a different proxy server for different networks in user.js

    I need to automatically set the proxy configuration depending on the network I am connected to. Can this be done through the user.js?
    Simple logic would be:-
    if IP=10.20.30.0 use proxy A
    if IP=172.18.19.0 use proxy B
    else DIRECT
    Thanks
    Leon

    No, you can't do it that way.<br />
    You could create a set of files user.js and use a bat or cmd file to copy the file with the proxy setting that you want to use to user.js and then start Firefox.
    <pre><nowiki>cd <path to profile folder>
    delete user.js
    copy user-proxy1.js user.js
    start "" "C:\Program Files\Mozilla Firefox\firefox.exe"
    </nowiki></pre>
    You can also use an extension.
    *FoxyProxy: https://addons.mozilla.org/firefox/addon/2464
    *QuickProxy: https://addons.mozilla.org/firefox/addon/1557
    *SwitchProxy: https://addons.mozilla.org/firefox/addon/125

  • How can I write a simple WINCGI for iPlanet?

    I have wrote a veri simple CGI program in Delphi. The code looks like this: writeln('CONTENT-TYPE: TEXT/HTML');
    writeln('<HTML>');
    writeln('<H3>Hello world</H3>');
    writeln('</HTML>');
    As you see it's very simple, but if I want to run like this:
    Click here
    I get this error from iPlanet:
    send-wincgi reports: Could not open pipe (The operation completed successfully.
    What's this? Can anybody help to me???

    Hi,
    Please look out the below link, I hope this help.
    http://knowledgebase.iplanet.com/ikb/kb/articles/3255.html
    If still an a issue, Please let know your iWS version with service pack. And last 10 lines of error log.
    Thanks,
    Dakshin.
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support.

  • How can I install Firefox on a server that does not have an internet connection?

    I run Firefox on a server to display graphs for a program. I was able to save, upload and install Firefox version 21 on my server because it used the executable installation program. Versions 22 and 23 use a stub program that goes to the internet and installs the program. My server does not have an internet connection, so the stub program does not work. Can I get a copy of the executable program that installs the program without having an internet connection?

    hello pkautzman, the full install packets that are capable of an offline installation are available at https://www.mozilla.org/firefox/all/.

  • How do I create a Https Proxy server

    hi,
    I am writing a Proxy server in java. But my pogram do not support https protocol.Could you please tell me how can I implement a https proxy server.some sample code is more helpful.
    This is very URGENT for me.
    Thanks
    Sujith Varghese

    Hi Varghese,
    Reading the thread I am able to make out u r facing the same problem as I do.
    current scenario#1:
    Machine#1 client (using URLConnection("https://...") ----> Machine#2 (Server https port)
    what I want scenario#2
    Machine#3 client (using URLConnection("https://...") ---> Machine#1 (Proxy for https)----> Machine#2 (Server https port)
    In scenario#1
    - I have a Client machine at Location#1 which can connect to on Location#2
    - I only have SSH connection to machine at Location#1
    now this scenario#2 is what I would like to run so that
    - I am able to connect to mc#2 at loc#2 from a machine at loc#3 with mc#3
    - effectively starting a https proxy at location number mc#1 at loc#1.
    Hope that clears the problem domain.
    any help will be greatly appreciated.
    regards-
    _Jagsir                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How can i write code in Inbound ABAP proxy method

    Hi,
    All
    Iam doing server proxy ascenario
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    i have done
    steps:
    1:I have done inbound  proxy interface in xi
    2:i have created a inbound abap proxy in my SAP WEB AS6.4 using SPROXY.
    3:I need to write code in Z11_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS method
    if i double click on that method it is not opening how can I write code.

    Hi,
    You have to goto the class
    <b>ZCL</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS not
    <b>Z11</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS
    Check on the third step.
    Regards
    Vijaya

  • "Safari can't connect to the proxy server"

    Hello again...
    My 10.6 Server is up and running! thanks for all the help...however...
    When I try to access the internet via Safari from the actual server, I get the "Safari can't connect to the proxy server" message" but all the client machines can successfully access the internet....
    I'll start to read up on proxies but if someone can offer a suggestion in the meantime, that would be terrific. I know it's something simple I am missing...
    thanks!

    No snarkiness taken Mr. Hoffman...As a full-time high school teacher, I've been setting up our small school server on my own time for the past three months...with the help of the server docs, manuals, and the great help found within this forum, we are finally to a point where we can begin using the server.
    What I'm just not understanding is WHAT proxy do I use? I see all kinds of proxy servers out there but is there a specific one I should be using?
    Again, forgive me for my ignorance on this matter...I just don't understand why after a year of not using a proxy server, all of a sudden we need to have one? And this issue came about when Safari was unable to "connect to the proxy server"...
    MrHoffman wrote:
    1) So normally, there ISN'T a proxy being used?
    Proxies are used in school and corporate environments, and as a mechanism to >implement "network nanny" or parental controls, or when information leakage >involving sensitive or classified data, or personal or credit card data, or >other sensitive data is involved.
    When IT folks (or parents) are looking to monitor or control or track network access.
    up to this point I don't believe we were using a proxy server?
    2) A proxy "regulates" what traffic is passed between machines?
    A proxy can enforce access, or can cache access, yes.
    So no proxy in effect means traffic goes unchecked between computers...?
    Correct.
    do we HAVE to use a proxy server with the server?
    3) Where does a proxy take effect? At the Router/Gateway? The Server? or >individual machines?
    A functional proxy requires a proxy server, and settings at the firewall, and >on the client box.
    The proxy setting can be established via WGM, or locally via the system >preferences, or (and the following are less common) via malware or such, or due >to a bug. These settings are usually altered with WGM and system preferences, >in the vast majority of cases.
    Enabling a proxy server on the snow leopard server should help us out...but again, which address do I use? (in the server doc you referenced, it had "proxyserver.apple.com:8080")but I think that was just the format to use...
    Without intending any snark, read the manuals? Servers are big and complex >and expect an understanding of much more than the client boxes do; that's the >inherent difference between "server computing" and "client computing", after >all.
    I'm definitely appreciating how much involvement and understanding it takes to get one of these set up...and over the past three months, we've come a long way...
    again, thanks for the guidance and help!

  • List v = new Vector() how can i write this ?

    List v = new Vector() how can i write this ?
    vector does not 'extends' List rather it 'implements' only ......so how can write this way ? ( polymorphism applies only for 'extends' ).

    my question in a simple way is :
    List some_list extends Vector
    No, List is an interface; Vector is a concrete class. Read the javadocs.
    Vector implements List
    >
    AND
    List some_list implements Vector
    are these two same in behaviour
    our  apart from theoretical differences ?thanks
    Interfaces don't have any implementation; they're pure method signatures. When a concrete class implements an interface, it makes a promise that says "I will provide implementations for exactly these methods. Any client can call a method from the interface and I will do something 'sensible' if I'm written correctly."
    From the point of view of static and dynamic types, there's no difference between interfaces and classes.
    C++ has interfaces, too - they're classes with all pure virtual methods. If you understand how C++ works, the concept shouldn't be hard.
    ArrayList is preferred precisely because it isn't synchronized by default. (You can always make it so using java.util.Collections if you wish later on.) If you don't need synchronization, why pay the performance penalty?

  • Firefox keeps coming up saying firefox is configured to use a proxy server that is refusing connections. How do I fix this

    When I try to load my firefox page, I keep getting the same message:
    Firefox is configured to use a proxy server that is refusing connections.
    How I do I fix this? I have uninstall firefox and reinstalled and still the same.

    In Firefox 3.6.4 and later the default connection settings have been changed to "Use the system proxy settings".<br />
    You can find the connection settings in Tools > Options > Advanced : Network : Connection<br />
    If you do not need to use a proxy to connect to internet then select "No Proxy"
    See "Firefox connection settings":
    *[[Firefox cannot load websites but other programs can]]

  • I have been using firefox for a long time, today when i tried to launch firefox i recieved "Firefox is configured to use a proxy server that is refusing connections." i dont know how to fix this. I didnt change any settings.

    I have been using firefox for a long time, today when i tried to launch firefox i recieved "Firefox is configured to use a proxy server that is refusing connections." i dont know how to fix this. I didnt change any settings, im the only person who uses this computer

    You can find the connection settings in Tools > Options > Advanced : Network : Connection<br />
    If you do not need to use a proxy to connect to internet then select "No Proxy"
    See "Firefox connection settings":
    * [[Firefox cannot load websites but other programs can]]

  • How can i write a string into a specified pos of a file?

    How can i write a string into a specified pos of a file without read all file into ram and write the whole file again?
    for example:
    the content of file is:
    name=123
    state=456
    i want to modify the value of name with 789
    (write to file without read all file into ram)
    How can i do it? thank you

    take this as an idea. it actually does what i decribed above. you sure need to make some modifications so it works for your special need. If you use it and add any valuable code to it or find any bugs, please let me know.
    import java.io.*;
    import java.util.*;
    * Copyright (c) 2002 Frank Fischer <[email protected]>
    * All rights reserved. See the LICENSE for usage conditions
    * ObjectProperties.java
    * version 1.0, 2002-09-12
    * author Frank Fischer <[email protected]>
    public class ObjectProperties
         // the seperator between the param-name and the value in the prooperties file
         private static final String separator = "=";
         // the vector where we put the arrays in
         private Vector PropertiesSet;
         // the array where we put the param/value pairs in
         private String propvaluepair[][];
         // the name of the object the properties file is for
         public String ObjectPropertiesFileName;
         // the path to the object'a properties file
         public String ObjectPropertiesDir;
         // reference to the properties file
         public File PropertiesFile;
         // sign for linebreak - depends on platforms
         public static final String newline = System.getProperty("line.separator");
         public ObjectProperties(String ObjectPropertiesFileName, String ObjectPropertiesDir, ObjectPropertiesManager ObjectPropertiesManager)
         //     System.out.println("Properties Objekt wird erzeugt: "+ObjectPropertiesFileName);
              this.ObjectPropertiesFileName = ObjectPropertiesFileName;
              this.ObjectPropertiesDir = ObjectPropertiesDir;
              // reference to the properties file
              PropertiesFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
              // vector to put the param/value pair-array in
              PropertiesSet = new Vector();
         //     System.out.println("Properties File Backup wird erzeugt: "+name);
              backup();
         //     System.out.println("Properties File wird eingelesen: "+PropertiesFile);
              try
                   //opening stream to file for read operations
                   FileInputStream FileInput = new FileInputStream(PropertiesFile);
                   DataInputStream DataInput = new DataInputStream(FileInput);
                   String line = "";
                   //reading line after line of the properties file
                   while ((line = DataInput.readLine()) != null)
                        //just making sure there are no whitespaces at the beginng or end of the line
                        line = cutSpaces(line);
                        if (line.length() > 0)
                             //$ indicates a param-name
                             if (line.startsWith("$"))
                                  // array to store a param/value pair in
                                  propvaluepair = new String[1][2];
                                  //get the param-name
                                  String parameter = line.substring(1, line.indexOf(separator)-1);
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  parameter = cutSpaces(parameter);
                                  //get the value
                                  String value = line.substring(line.indexOf(separator)+1, line.length());
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  value = cutSpaces(value);
                                  //put the param-name and the value into an array
                                  propvaluepair[0][0] = parameter;
                                  propvaluepair[0][1] = value;
                             //     System.out.println("["+ObjectPropertiesFileName+"] key/value gefunden:"+parameter+";"+value);
                                  //and finaly put the array into the vector
                                  PropertiesSet.addElement(propvaluepair);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while reading property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   // System.out.println("in ObjectProperties");
         // function to be called to get the value of a specific paramater 'param'
         // if the specific paramater is not found '-1' is returned to indicate that case
         public String getParam(String param)
              // the return value indicating that the param we are searching for is not found
              String v = "-1";
              // looking up the whole Vector
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = new String[1][2];
                   // trying to get out the array from the vector again
                   s = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we look up the value and write it in the return variable
                        v = s[0][1];
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // giving the value back to the calling procedure
              return v;
         // function to be called to set the value of a specific paramater 'param'
         public void setParam(String param, String value)
              // looking up the whole Vector for the specific param if existing or not
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we remove the param/value pair so we can add the new pair later in
                        PropertiesSet.removeElementAt(i);
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // if we land here, there is no such param in the Vector, either there was none form the beginng
              // or there was one but we took it out.
              // create a string array to place the param/value pair in
              String n[][] = new String[1][2];
              // add the param/value par
              n[0][0] = param;
              n[0][1] = value;
              // add the string array to the vector
              PropertiesSet.addElement(n);
         // function to save all data in the Vector to the properties file
         // must be done because properties might be changing while runtime
         // and changes are just hold in memory while runntime
         public void store()
              backup();
              String outtofile = "# file created/modified on "+createDate("-")+" "+createTime("-")+newline+newline;
              try
                   //opening stream to file for write operations
                   FileOutputStream PropertiesFileOuput = new FileOutputStream(PropertiesFile);
                   DataOutputStream PropertiesDataOutput = new DataOutputStream(PropertiesFileOuput);
                   // looping over all param/value pairs in the vector
                   for (int i=0; i<PropertiesSet.size(); i++)
                        //the String i want to read the values in
                        String s[][] = new String[1][2];
                        // trying to get out the array from the vector again
                        s = (String[][]) PropertiesSet.elementAt(i);
                        String param = "$"+s[0][0];
                        String value = s[0][1];
                        outtofile += param+" = "+value+newline;
                   outtofile += newline+"#end of file"+newline;
                   try
                        PropertiesDataOutput.writeBytes(outtofile);
                   catch (IOException e)
                        System.out.println("ERROR while writing to Properties File: "+e);
              catch (IOException e)
                   System.out.println("ERROR occured while writing to the property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
         // sometimes before overwritting old value it's a good idea to backup old values
         public void backup()
              try
                   // reference to the original properties file
                   File OriginalFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
                   File BackupFile = new File(ObjectPropertiesDir+"/backup/"+ObjectPropertiesFileName+".backup");
                   //opening stream to original file for read operations
                   FileInputStream OriginalFileInput = new FileInputStream(OriginalFile);
                   DataInputStream OriginalFileDataInput = new DataInputStream(OriginalFileInput);
                   //opening stream to backup file for write operations
                   FileOutputStream BackupFileOutput = new FileOutputStream(BackupFile);
                   DataOutputStream BackupFileDataOutput = new DataOutputStream(BackupFileOutput);
              //     String content = "";
                   String line = "";
                   // do till end of file
                   while ((line = OriginalFileDataInput.readLine()) != null)
                        BackupFileDataOutput.writeBytes(line+newline);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while back up for property file: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   System.out.println("this is a serious error - the server must be stopped");
         private String cutSpaces(String s)
              while (s.startsWith(" "))
                   s = s.substring(1, s.length());
              while (s.endsWith(" "))
                   s = s.substring(0, s.length()-1);
              return s;
         public String createDate(String seperator)
              Date datum = new Date();
              String currentdatum = new String();
              int year, month, date;
              year = datum.getYear()+1900;
              month = datum.getMonth()+1;
              date = datum.getDate();
              currentdatum = ""+year+seperator;
              if (month < 10)
                   currentdatum = currentdatum+"0"+month+seperator;
              else
                   currentdatum = currentdatum+month+seperator;
              if (date < 10)
                   currentdatum = currentdatum+"0"+date;
              else
                   currentdatum = currentdatum+date;
              return currentdatum;
         public String createTime(String seperator)
              Date time = new Date();
              String currenttime = new String();
              int hours, minutes, seconds;
              hours = time.getHours();
              minutes = time.getMinutes();
              seconds = time.getSeconds();
              if (hours < 10)
                   currenttime = currenttime+"0"+hours+seperator;
              else
                   currenttime = currenttime+hours+seperator;
              if (minutes < 10)
                   currenttime = currenttime+"0"+minutes+seperator;
              else
                   currenttime = currenttime+minutes+seperator;
              if (seconds < 10)
                   currenttime = currenttime+"0"+seconds;
              else
                   currenttime = currenttime+seconds;
              return currenttime;

  • How can I write an iBook review without using iTunes?

    I have a problem on how can I write a review on an iPad book or iBook without using iTunes. Some of my friends are also asking me on how can I write a review on an iBook without using iTunes. I am on dilemma and I need your help to solve this problem. I hope you can respond soon if possible. Thanks.

    Simple, you cannot.  You can only post reviews through the store front gateway.
    Well, actually, you can write the review in any editor or tool you wish to use, but to post it, you have to login to the store account.  If you do not have an AppleID and store account, you cannot post a review.

  • How To read/write file on remote server in java

    Hi All,
    How To read/write file on remote server in java? I mean using URL - http://www.xyz.com can I right file to that perticular server.
    Thanks in advance

    If your server support a means of uploading files you can.
    A popular means is [http://en.wikipedia.org/wiki/WebDAV]
    However, by default web server don't allow you upload files, its usually something you need to configure or install.
    I suggest you have a look at your web servers documentation.

  • How Can I write text in color

    Simple use for text output is System.out.println("Hallo");
    But how Can I write text in different color?

    http://www.javaworld.com/javaworld/javaqa/2002-12/02-qa-1220-console.html

Maybe you are looking for

  • Any way to make play count increase if the track is only partially played?

    Sometimes I get impatient and click "next" as a song fades out or has a little dead air at the end. But itunes doesn't count a song as played unless it goes all the way to the end and on to the next track it seems. Any way to change that?

  • How to know if a MRP run element is using Quota Arrangement and lot size?

    Hi all, Two questions: A) How to determine if a source is actually pulled from Quota Arrangement? I am wondering if there is anyway from ABAP table or from Transaction (i.e. Purchasing Order) in which the source is pulled from a Quota Arrangement? We

  • Dynamic temp tables

    I am taking off the post, since didnt solve my purpose Quote from post: " why do you need dynamic temp tables? Why not put all in same table and add a column called City inside it to identify the city to which they belong?"

  • Windows XP - Home version issues

    Hi all, Is there any known issue on running DBA Studio on Windows XP - Home edition ? I've installed an Oracle 8i - Personal edition on it. The Oracle service runs fine and I can connect to it through SQL*Plus, but the DBA Studio fails on opening the

  • Find a field in TX: CJE3

    Dear All, I m working on transaction CJE3, when i run a report 12KST1A ( Budget/Actual/Commitment). I get an output with all the values, like budget-Total, Actual-total, Commitment and so on. Now my requirement is that i need to know the field name o