We've explored the proxy path at length. There are even more issues around security. In my experience to attempt to do this without plugins is just not feasible. Modern browsers support extension - and projects like CrossRider are bringing this functionality to even IE.
David
Mushon, I took a quick look at Porthole and it doesn't look relevant,
sorry.
Ideally, we won't use iframes as they're evil and do open up a whole
different can of worms.
So... i had a small breakthrough here.
Basically, I wrote a small EventMachine service that accepts a request
on my localhost and fetches a URL from a remote server (lets say
http://www.nytimes.com).
When my service receives the response from the remote server it adds a
<base> tag to the response HTML <head>, thus ensuring that any
relative URLs are handled correctly.
This method will work well in most cases.
It will fail where:
1. Site relies on Ajax to operate normally
2. Site HTML is so badly written that loading it outside the normal
domain will simply break (for example, the infamous ynet.co.il)
This is very much a POC but we can rely on such method to serve
content from the shiftspace domain and add any JS we need along the
way
What do you mean by malicious websites?
Btw, how does your proxy work? what technologies is it written in?
--
You received this message because you are subscribed to the Google Groups "ShiftSpace" group.
To post to this group, send email to shift...@googlegroups.com.
To unsubscribe from this group, send email to shiftspace+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/shiftspace?hl=en.
Maybe if there's interest Joe can walk you (Zohar) through the way we built and used the proxy.Few things re: securityDo we have to use cookies in the proxy?
Can we sanitize the API that is sent to the server? (for example, using jsonp or some other similar xss workaround method?
> Sounds very interesting.
>
> Could you point me to the right place on the § github repo?
>
https://github.com/ShiftSpace/shiftspace/blob/master/server/server.py#L267
David
Thanks for that David
So, it looks like the server itself is not supposed to handle
malicious sites. That's the JS job... right?
Other than that, the two differences between this and the bit of code
i used for testing are:
1. I didn't do any DOM / URL manipulation but simply added a <base>
tag to handle the relative URLs. This means less processing time /
resources. The server is just a pipe line and the manipulation is done
at the response level (i.e. simple string manipulation)
2. I used EventMachine (Ruby), which can scale a bit better as far as
i know (and as the current solution is Python based, Twisted is
probably the more suitable option)
So, the question is what now :)