thanks! have a good day, Thierry Boileau
2015-01-03 20:41 GMT+01:00 Xybrek <xyb...@gmail.com>: > On Tuesday, 07 October, 2014 08:12 PM, Jovan Jovanovic wrote: > > Hi everybody, > > > > after a lot of tries to build a proxy server I found it really easy > using Restlet. Although I have an obvious issue after setting all the > traffic from Chrome to go through my proxy, I get redirection loop (as also > the routed URL is trying to go through proxy). Here is the code that I am > using: > > > > public static void main(String[] args) throws Exception { > > Component component = new Component(); > > component.getClients().add(Protocol.HTTP); > > component.getServers().add(Protocol.HTTP, 8111); > > Application application = new RestletProxy(); > component.getDefaultHost().attachDefault(application); > > component.start(); > > } > > @Override > > public Restlet createInboundRoot() { > > Router router = new Router(getContext()); > > String target = "http://www.google.com"; > > Redirector redirector = new Redirector(getContext(), target); > > router.attachDefault(redirector); > > return router; > > } > > > > So I am just trying to redirect every single request to google. Is it > possible using restlet? > > > > ------------------------------------------------------ > > > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3089543 > > > > I just want to share that yes it is possible, I have a running proxy in > heroku that runs Restlet proxy and redirects all traffic to a given URL > > ------------------------------------------------------ > > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3093682 > -- *Thierry Boileau, Mr B* +1 (408) 387-3184 • tboil...@restlet.com <http://restlet.com/> 6 Rue Rose Dieng-Kuntz • Nantes, 44300 • France ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3096702