I'm working in a Java (Android) project, the main idea is to capture urls and block the access to dangerous pages, so to obtain the urls that the user access I'm using pcap4j
library as follows:
IpV4Packet ipV4Packet = packet.get (IpV4Packet.class);
Inet4Address srcAddr = ipV4Packet.getHeader().GetSrcAddr();
System.out.println(srcAddr);
So if I access the url (https://es.wikipedia.org/wiki/Google) the code will generates the domain name, something like : (wikipedia.org), but what I really need is the main url that generates the request, How can I get the complete URL (https://es.wikipedia.org/wiki/Google)?