This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Java Proxy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Java Proxy" Watch "Java Proxy" New topic
Author

Java Proxy

James Woodword
Greenhorn

Joined: Dec 20, 2007
Posts: 1
Hello, I have been learning java over the past few months, and do not know much about network programming; however I want to build a packet sniffer. I understand that the only way java can function as a packet sniffer is as a proxy because java cannot use raw sockets. I want it to be able to read raw packets, and filter them before sending them to the client, or even send them back to the server based on my defined rule set. The protocol is not HTTP. I want to build something similar in functionality to Winsock Packet Editor, although obviously not by the same method as WPE is not a proxy server. My question is if this project would be doable in java, and what librarys would be useful for this project. I have glanced over jpcap.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
Welcome to JavaRanch.

It's not possible without using some native code through JNI (like jpcap does), because the Java API does not have access to low-level TCP/IP functionality.


Ping & DNS - my free Android networking tools app
 
 
subject: Java Proxy
 
Similar Threads
Store JDBC connection password
Getting Connection Refused on HttpURLConnection
requesting suggestions on topics for project on network security using Java(final year project)
blank index.jsp on Tomcat 5.5.9
raw socket handling