Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Java Proxy

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Posts: 43016
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Yeah, but does being a ninja come with a dental plan? And what about this tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic