News for hackers. Stuff that matters.

browsergap

Re:Sandboxing and workload isolation on Friday July 31, 2020 @07:55AM (#24007786)
OK, come join my club! https://github.com/dosyago send me an email :)
Re:Sandboxing and workload isolation on Thursday July 30, 2020 @09:25PM (#24004692)
I might look at nsjail. I run chrome headless inside of cgroups (for cpu and memory restrictions) and using a runtime generated no-login user (for privilege restrictions), and with a custom group id (for IP tables bandwidth and routing restrictions). Plus I monitor the pool of chromes with a shell script and if any exceed a resource threshold, I used cpulimit then pkill to take care of it.

I could just use docker (and I have docker images of this app that some people like to run) but I think this way is more lightweight, gives me more explicit control, and leans into the OS level security features, like privileges and cgroups with a couple of Unix commands.

Thanks a lot! I put a lot of effort into getting it to work on latest Chrome, Safari and Firefox on desktop and mobile and working out various bugs. Still more work to do but I feel it's pretty solid right now.

Stack is:

- Google Chrome headless w/ remote debugging protocol

- NodeJS + express + ws

- Shell scripts for some monitoring and user management

- Front-end: Plain JS + dumbass[0] and style.dss[1] (both my own work)

Open source code free for non-commercial use is here: https://github.com/dosyago/BrowserGap

[0]: https://www.npmjs.com/package/dumbass

[1]: https://www.npmjs.com/package/style.dss

The main link is based in the US. Sorry if a bit slow.

Here's a smaller Tokyo server: https://tokyo.cloudbrowser.xyz/

Sessions are ~ 30 minutes

Re:Free cloud browser internet cafe on Friday July 24, 2020 @10:04PM (#23946316)
really? I have the open-source adblock patterns from one adblocker installed at the fetch level blocking requests. You should see at least some ads being blocked.

I get you're just trying to be helpful thanks. Actually memory, and CPU is not such an issue for any browsing unless people are cryptomining or playing online games (like quakejs). I've got scripts to try to watch that usage and cut people off.

Chrome is pretty lithe with most usage.

In terms of blacklist do you have a good ref point? Also...what sort of spam/abuse are you thinking? I didn't consider people browsing open internet to be risky re: content...I thought all bad stuff is on the dark/tor web.

Re:Free cloud browser internet cafe on Friday July 24, 2020 @09:25PM (#23946122)
Based in the US. Sorry if a bit slow. Here's a smaller Tokyo server: https://tokyo.cloudbrowser.xyz/

Sessions are ~ 30 minutes

It's just because it's text. If we could see the faces of some people while they mouthed off on their deranged rant, we'd all politely turn back to whatever better conversation we were having, and chuckle...It's just because the genre of "text" puts everyone on the same volume and medium/timbre/character (fading doesn't really alter this).

Crazy rants that would not get a word in edge wise ordinarily, get to take full spectrum bandwidth. Probably, just like this comment will seem to some people. You don't need much empathy, social acuity and awareness yo shout at the top of your ... fingertips on a forum. But to get the attention of a room of smart people in real life....you need a lot more skill. Text reduces everyone's utterances to the same medium background......it's sad. Sad that internet is 31 years old....but we don't have a richer way for people to talk toghether.

Funnily enough, maybe THIS startup, is doing something toward that.

Re:Hacker95.css – Make Hacker News look like Windows 95 on Thursday July 23, 2020 @11:45PM (#23935486)
You could probably make a bookmarklet to pull the stylesheet from github and add it to the document stylesheets. Maybe using the new Stylesheet constructor?
I disagree. The gestalt works in a lot of these the same way as in gallery abstract art
Thanks. I'll look into this
Sort of but not exactly, because IIRC they used a downloadable client. I wanted something that could run anywhere easily, hence the browser client. I used KL a few times, and followed their story, and found it interesting they moved to Tokyo. At the time I considered Import.IO, KL, Connotate, Mozenda and DiffBot to be the main competitors. My main idea as a point of difference was to be able to share the structure you've mapped on web apps, and share the action sequences as things others can use, so everyone gets a network effect benefit from the work of everyone else.

Thanks for posting. I don't think I knew they were YC, and did not know they were acquired by Palantir. That's interesting, and good news. Means the market is growing.

That's great advice about GPUs. Thanks!

I am seeing some lower CPU usage on a new machine with 4 Nvidia T4 GPUS I just set up.

https://gpus.cloudbrowser.xyz

I also had the idea to run browsers in the cloud and intercept the interaction stream to record and replay interactions, also for the reasons you say, because it reduces a large class of bugs. But not for test automation, rather for web scraping. I applied to YC with this around 9 times. Great to see you convince them this is a good thing!

Are you using the Chrome DevTools protocol? That's what I built on top of. You can see my open-source code for this here: https://github.com/dosyago/BrowserGap

And a demo running right now of the interactive cloud browsers (without automation, it's WIP):

https://start.cloudbrowser.xyz [0]

[0]: Currently on Show https://news.ycombinator.com/item?id=23904243

Fitz and Todd, wanna connect?

No but I could add gpus to the machine. Good idea to try I guess.

Yes it's built on top of chrome Dev tools.

Also, to save bandwidth, what happens is, a couple seconds after the last interaction, new screens will no longer be sent. And they will only be sent if you are moving your mouse / touching the screen. So you need to "keep active" if you are watching a video and want to keep getting images from it. Sound will continue tho.
Thanks. Just pixel pushing screenshots from the remote browser, base64 encoded and sent through websocket. Lots of room for improvement in the speed. Also, server is in Tokyo.
This demo is based on this open source code https://github.com/dosyago/BrowserGap

To save costs on the demo, image quality is tuned to make bandwidth as low as possible.

Re:Show HN: A Head for Headless Chrome on Sunday July 19, 2020 @09:59AM (#23889412)
This is built using (ah, obviously) headless Chrome. I think a "Live Puppeteer" demo might be more suited for this HN audience, where we have, LHS a code editor to enter a puppeteer script, and RHS, a BrowserView where you can interact with it like a normal browser, and drive it with puppeteer.

Under the hood, I don't use puppeteer, nor chrome-remote-interface, I actually use the raw ToT (tip of tree) DevTools protocol over secure websocket with some helpers to send commands, and receive responses and events. The reason to not use puppeteer is because it is missing some functionalities that are useful for "virtualizing" a browser like this, such as book-keeping of JS execution contexts (isolated worlds) and sessions (connections to a tab), and it was easier to create my own API that mapped 1-to-1 with my requirements atop the raw protocol, rather than build my API atop someone else's API atop the raw protocol. Also earlier on there were times when puppeteer didn't keep up to date with the latest ToT methods which were useful such as "flat session mode" (the ability to send a command to a particular tab just by including the sessionId).

Even tho I don't use pptr to build this, you can still use pptr to connect to the debugging port of the remote headless browser. However, not in the demo I am making available, for the simple reason that, 1) such connections have no authentication, and 2) exposing them to the internet means you could connect to someone else's browser, breaking privacy and security. These blocks are affected using IPTABLES and other blocks are effected on the cloud provider (GCP) level using firewall rules. The browsers are also blocked from accessing local files via file URLs.

I originally made this as part of a "repetitive task" automation product, but realized that "remote browser isolation" is actually a thing, so I'm trying to monetize this as a product in itself. There are a LOT of competitors: Symantec, Cloudflare/S2 (who use a really cool way to save bandwidth and maintain security by transferring not pixels but vector draw instructions from the chrome render engine), Webgap, McAfee/LightPoint, Ericom. I'm hoping that by having an open source product, that's relatively solid (tho by no means the lowest bandwidth (compared to S2/CF), and by no means has the status of a product backed by an existing security company (Symantec), or by experts in this field (LightPoint, WebGap, Ericom)), well I'm hoping that I'll be able to get some customers. I do think open source can work here.

But maybe in the end using this for security will be too hard to compete against the incumbents, and it will serve better as a robust part of my original idea of repetitive task automation (RPA for web apps).

That's some of the story of development. It's around 35K SLOC, all by me, took around just over 1 year full time, and I learned a lot, and got some GitHub starrs. Yay. Code is at:

https://github.com/dosyago/BrowserGap

You can't use it for free if you're a for profit, but you can if you are government or not-for-profit. In the former case I aim to sell per seat, or per site licenses, and also charge for install and maintain. And in the latter, aim to only charge for install and maintain. What's the point of taxing the public purse more? Sometimes I doubt I can compete with products of competitors (especially capturing the vector draw instructions, tho theoretically that should be possible to implement like S2 did), and my aim is mostly to have a fairly familiar and easy to use browser experience.

Re:Giving GPT-3 a Turing Test on Sunday July 19, 2020 @08:31AM (#23888895)
Cool. I don't like to include consciousness in this reduction, I consider that something sacred. The field that permeates all of us and everything. The thinking part of it, I think there's a chance it could be as you describe, with our brains coming with algorithms (or the ability to form similar algorithms) that do domain transformation, stateful processing, associate lookups, memory. I like to think of the consciousness, as simply being aware of this, and I guess "gently guiding" it through intention. It's what tunes us into our thinking and let's us perceive it. But the thinking could occur without that "supervisor". But perhaps somehow consciousness is the spark which gives us life, because when it leaves the body, the body and brain no longer function, or at least no longer animate. And consciousness can seem to exist within and outside the body.

Maybe what we call intelligence, and what we are trying to create with AI is just "how a brain" thinks. That version of AI definitely seems achievable, it's a;sp interesting to think what consciousness is, when it seems that people have been able to perceive things outside their body, while it was dead, and then return to that body upon it being revived, and being able to bring verifiable details back with them...Or a consciousness being able to recall things inbetween incarnations in bodies....Those impressions must involve pattern matching and thinking as well...But there's no substrate it seems. Just the universe itself. Which is pretty bizarre...Makes you wonder why our brains need to be so complex at all, if our souls can think and remember too...

Perhaps even more scary and bizarre (and not what I believe) but what if having a soul (as in some consciousness part that exists separate to the body) is actually real but not common. So the strange anecdotes of these occurrences are not more widespread simply because, for whatever reason, most bodies don't have souls...I'm sure it's not like that...but since we're speculating, may as well take this to where it goes, which is, if that's the case then consciousness (which we all have, otherwise the body is anesthetized), and the soul (which it seems some people have, owing to how they have disembodied memories that are factual) might be separate.

So if the body has consciousness that's entirely embodied, maybe AI's can have consciousness as well. Then what's the soul? And what is the soul doing when a person's brain and consciousness is doing the thinking? Or if we all have a soul (a disembodied consciousness) why can only very few people seem to have disembodied memories?

If we make the right AI substrate for consciousness, will it attract souls, like moths to a light?

Older »