Show HN: Browsh – A modern, text-based browser
brow.sh
brow.sh
Also, I'd be interested in any opinions here about how to financially support this project. At the very least I'd just love to somehow make this my job.
The harder thing is trust, trusting you to not change any images. On the other hand that'd make for a fun VPN service for general browsing (but again then it comes back to trust) but if you target it as a browser plugin bundled VPN service that saves on bandwidth you could hit more of an audience and use that income to fund Browsh. I figure you dont want to get too far outside of that scope though (development wise) since it's a lot more work.
I also like the other ideas of using some of the Browsh capabilities to scrape the web, maybe as a paid API, sure you can write a script to do that, but if you can curl / postman an API that does it for you and returns what you need, then why wouldn't you? Trick is can an API be done just perfectly enough? How do you tell it to give you whatever part of the screen with whatever requirements? It could sound simple but get complicated quickly enough. If it's too complex maybe a compression VPN is a better target.
I've got a good feeling about text.brow.sh, it's so simple. As you say I just need to work on the consistency of what it returns.
Thanks for your thoughts!
That would work nicely as a hosted service with an app. Like a more aggressive version of opera's bandwidth reduction.
The military might have similar problems.
It's not really ready fir consumers yet though.
I like the awards for lo-fi websites, I could have a showcase section of the website.
What I mean is an app that connects to an instance (vm, server) a brow.sh.
I would like to install this in a lxc container and connect to it from my mobile via VPN and use HTTP-proxy settings or and with an specific brow.sh-app for my mobile. Could this work?
Currently though html.brow.sh is non-interactive, as soon as I start letting people logging in it opens up a whole bunch of privacy concerns!
* Forms not working in Firefox but works fine in the terminal. Google search...
Some more testing:
- use nginx as a proxy for browsh - configure the Firefox instance (install uBlock Orgin, remove history and set other privacy related configurations and hope it works.
Keep up the good work!
What made you think about using Nginx as a proxy?
You can already install Firefox extensions: https://github.com/browsh-org/browsh/issues/45
There's already ways to drive a headless UI (Selenium, puppeteer), but they require automation testers to interact with page elements via the "normal" DOM which can be quite painful in terms of creating automation tests - DSLs to drive DOM automation are necessarily huge.
I could envision browser automation via browsh using a very small DSL e.g. browsh.url() to navigate to a URL, browsh.click() to click on an element, browsh.text_exists?() to check whether text exists, browsh.link_exists?() to check whether a clickable link exists
But yes, I'd love for Browsh to be used in such a way!
EDIT: Since Browsh depends on Firefox I'm curious whether it's actually faster than a graphical browser.
A very fast browser not tied to a graphical display with the bonus of being able to put error screenshots into all of our existing tooling could actually be quite beneficial here, whether the text is character-identical every time or not.
Given the rest of your sentence, I think you mean the opposite.
I think before you can answer that question you have to figure out if there are enough geeks like you who think this is a useful enough tool to run / use regularly. They'll likely pay you $. Alternately, find use case where even just a few users / companies would pay $$$ each for some thing that it does that you can't easily get anywhere else and helps get work done.
For me it looks cool, and i'll give it a try, but i'm more likely to stay with my normal browser because with plugins like vimium i don't have to reach for my mouse very much. That's actually one of the reasons i use the command line so much. Make it work without constantly using my mouse and I'd be far more likely to use it. Once i'm using it regularly, then I'd be starting to think "I wish it would..." and then making those wishes come into practice is something i'd support. This is kind of a weird / esoteric thing that would just gradually improve so... maybe Patreon is a better route for getting support than normal software / feature / plugin sales.
personally, IF I find myself using it regularly, i think i'd be more likely to support you via a Patreon type regular donation.
So at the moment I guess it's just best to hope as many different people and organisations see Browsh as possible and seeing what sticks and where.
I've got Patreon, Paypal and Bitcoin setup already: https://www.brow.sh/donate/
The maritime industry could find a large benefit from using your software. A friend of mine is a marine electrician who often works on large commercial boats up in Alaska. Some of these boats will pay in the neighborhood of $7000 per month for satellite service and unless you're the captain you get very limited access time. I'm sure they'd be interested in cutting their web browsing costs.
So you connect (using ssh or chrome) to a dedicated host which sends you a digest of the page...
You can also "zoom in" on elements if you want higher resolution.
As a potential user, what are your opinions ?
(Sort of like the Amazon Silk browser..?!)
Edit: phrasing, and also looked at other comments
Definitely. Maritime companies and backcountry users probably won't be interested in messing around with a nifty open source tool nor the hosting infrastructure it'd require. They'll want this built out as a secure easy to use service.
@tombh Feel free to get in touch if you're interested in building or optimizing for satellite users. I'd be happy to provide some beta test feedback using my equipment.
I'd considered using a headless browser setup but I never got 'round to it.
If you structured this as a paid service where I could make some number of requests for some amount of money and get back basically what you've got now in monochrome mode, I'd probably sign up pretty quick.
This is sort of relevant to some other recent HN discussions around the trouble with large-scale crawling and the trouble with so much of it being restricted to Google now, so I don't think I'm the only one.
So much for 'the semantic web' I guess.
A handy guide to financial support for open source.
https://wiki.snowdrift.coop/market-research/other-crowdfundi...
Has further notes that don't just overlap with the lemonade-stand thing. Unfortunately, Snowdrift.coop is still not available to use itself at this point.
However I think there is very little real use for image to text-as-image conversion.
mpv -vo caca "https://www.youtube.com/watch?v=DLzxrzFCyOs"I didn't know about this utility. Awesome it does sound too. Thanks for pointing it out.
Another insidious idea is to pitch this browser to companies as a way to reduce wasted time on social media and time-wasting websites - employees could be trained on how to quickly extract text information from a website that is relevant to some business goals, without getting distracted by the time-wasting opportunities that a browser provides.
What I would love to see (but where far fewer promise of riches lay) is to use this as part of some great developer tool - this seems it could be a more intuitive way to test an interface than Selenium. Until then I look forward to personally supporting and using your awesome project!
Ha, the "reduce wasted time" idea is interesting one!
Thanks for your support :)
First though I really need to improve html.brow.sh
I'm getting tired of writing down GDPR violations to report.
But it's also interesting for the OP, maybe there's something patentable in there ?
Fraunhofer is a better example of an institute that made good money on tech patents with merit, as well as 3M and lots of other tech companies.
But as a rule these things are hard to monetize and while I'm not happy that it will be hard to monetize the work that went into this particular project at the same time I think it is good that patents are most likely a closed avenue.
Patents are - in my opinion - a net negative and the sooner they are abolished the better.
Many Tor users disable Javascript, because Javascript sometimes has anonymizing vulnerabilities. But disabling Javascript cripples many websites.
But I can type html.brow.sh/https://example.com via my Tor browser and get a non crippled website, even with Javascript disabled. This is a very practical use case and I think many will want to pay you to make it work better.
Previously I could not visit CNN.com via a JS-disabled Tor browser, but now I can type https://html.brow.sh/https://edition.cnn.com/ and Viola! (Well, it's still a little crippled but much better than a blank).
So, brow.sh benefits JS-disabling users. The Tor project receives donations and they dedicate them to enhance Tor. And, I think this is a neat enhancement. While I am not totally familiar with their money handling, I wouldn't be surprised if they are willing to funnel some of the funds to various side projects that improve the Tor experience.
In summary, the use case you advertise is minimal bandwidth for clients, but you missed the privacy use case, which someone may want to fund.
Edit: grammar fixes.
I think your specific wording does not ring the bells for the casual Tor user (hence "why not lynx"). Perhaps you should clarify the precise use case: No-JS users can see JS-dependent websites simply by URL prefixing. They get the modern web without activating JS locally.
One of the cases where developers still use text based browsers is in attempting to check accessibility of websites. For many large enterprises, there's a legal or contractual requirement to ensure a certain level of accessibility for users with disabilities.
You might not see the need for this, but others will. I could see it being used in some back end workflow.
`curl https://text.brow.sh/https://news.ycombinator.com/item?id=17... | grep snarfy`
Add terms that commercial use of the site requires an account setup and some pricing info. They can always host it themselves, but like many things, most people would rather pay someone else to do it.
I like it for reading. I like how all the text is displayed the same, in a fixed width font I'm used to looking at. There's nothing to distract me or get in the way.
The major benefit is that I don't enjoy an "experience", I just read the content and leave. So much of the modern web is built specifically to prevent that.
It might also be nice to have a mode where images are just replaced by filled boxes that are more visually distinguished from the surrounding content.
Have you got an example URL for a page that would benefit from those filled boxes you mention?
How does it reduce bandwidth exactly? It still has to grab all the html/css/js for the site being rendered.
As well SSH/Mosh access there's a HTTP service, that currently only outputs static, noninteractive HTML and basic graphics. For example: https://html.brow.sh/https://news.ycombinator.com/item?id=17...
So if OP goes down this road then I think he should allow users to access machines.
Do you think such a service would be significantly different to an email service in terms of privacy concerns?
If you weren’t the fine upstanding person you are, you’d have all the web traffic of users at your disposal: banking, secure interactions with healthcare providers, credentials to Hacker News, the whole nine yards.
With access to my email, you could probably reset a handful of my passwords to various services that don’t support dual factor auth, and you could probably discover what services I subscribe to.
I mean, I wouldn’t want you to have access to my email, but I would much rather that than a permanent man-in-the-middle web client.
Maybe something like:
https://github.com/rkt/rkt/blob/master/Documentation/running...
for VM backed containers - but I'm not sure if it's considered stable and/or secure.
But hw isolation might be worth investigating - as others are saying - hostile access to a web browser, including webmail etc - is pretty dangerous. And plain docker never had a good story wrt secure isolation.
Apparently there was "hypernetes", now stackube - for combining VM runtime and kubernetes:
https://kubernetes.io/blog/2016/05/hypernetes-security-and-m...
https://github.com/openstack/stackube
As far as I can tell, this allows the mix of k8 style pod/container management and VM level isolation:
https://stackube.readthedocs.io/en/latest/stackube_scope_cla...
As for lxd/freebsd jails and zfs - both offer very nice and easy to grasp environment for isolated services - and both should end a little more isolated than a typicaldocker setup (some services running as root in container, no additional lxc restrictions).
But all things considered, if you already have k8/docker set up to give every user a separate, possibly ephemeral container... Infrastructure is probably not where I'd devote most time. It should work well enough as is.
Damn, I can't believe I missed that! I fixed it in the code and will deploy soon with some other fixes.
https://html.brow.sh/https://html.brow.sh/https://html.brow....
Just in case you're put off by the thought of Emacs keychords, note that you can also use mouse to move backward and forward through history (it has icons for those), and of course you can click links.
But more importantly, it's Emacs. So if you wanted, you can press a key have the code copy-pasted to a temp file, run the compiler on that, display the result in a new window and file away both the code and the result to an org file for further studying.
Curious: why headless firefox and not headless chrome? Also: 'its main purpose is...to reduce bandwidth.' How does this reduce bandwidth? Is the assumption that you would deploy browsh on a server and ssh/mosh against that, and the bandwidth savings are to the client? (But full bandwidth usage to the server)?
And yes you're right about the use of a remote server to make use of the bandwidth savings.
Added: I guess https://www.opera.com/turbo still provides this feature. Is there anything comparable that can be self-hosted?
You can use the free live demos though: `ssh brow.sh` and https://html.brow.sh
$ ssh brow.sh
All of Browsh's servers are currently busy. Please try again soon.
Connection to brow.sh closed.
Seems like a cool way to do a demo for something that's a bit painful to install on macOS (would love to see $ brew install browsh). I'll have to give it another look once the HN effect has died down.[1]: https://github.com/browsh-org/browsh/releases/download/v1.2....
The more interesting that my gnome-terminal still receives/prints some codes. When I hit enter, it tries to execute them!
https://ibb.co/buhqE8 and (ENTER) https://ibb.co/itFz7T
Does anyone of you know the mechanism behind it?
EDIT: Does anyone of you know how to use it to type into terminal "sudo su -"?
When Internet is bad: packet loss at home, or travelling.
When I am fed up with bloated Web sites and don't have Opera 12 installed.
When setting a big font preference renders the Web page unusable.
When I need to browse something on my computer, but I am away and only have my phone with me. I can use ssh, but I cannot use vnc.
edit: it's so good that I got confused about which window I was looking at and tried to click links with the mouse :)
At least with the terminal client successive frame updates eventually render the text - a luxury we don't have yet with html.brow.sh
The owner ought to dispute that.
Edit: And I see that https://www.startpage.com/ isn't banned, and it includes a proxy option.
Because yesterday Google Safe Browsing considered this URL: https://html.brow.sh/mail.google.com a phishing attack. Even though the html.brow.sh service is non-interactive, it doesn't even return `<form>` tags, let alone JS.
Does "100 individual HTTP requests" mean 100 TCP connections?
As far as I know, according to RFC 2616, connection keep-alive was intended to promote making numerous HTTP requests. In fact, IME, most web servers default to setting max-requests at 100. Some are higher.
Following the guidance of the RFCs, for decades I have been using this HTTP feature to make 100 requests to a site in a single connection. That is 100 pages of HTML in one quick TCP connection. If I retrieve 3MB, it is 3MB of HTML from the website and zero from third parties. (Further, I have written filters to remove junk from the HTML and print only the content I want, e.g. for reading or to import into database. If I need to split into separate files, which is rare, csplit works nicely.)
In order to achieve this efficiency I could not and do not use a popular browser authored by ad-supported entities. I am an avid text-based web user who has no need for ads, graphics, and other external resources, e.g. Javascript. As such, I can use clients that can support http pipelining according to the RFCs. It works very well; no complaints.
Best of luck with this project.
ssh brow.sh
And then have a graphical browser from anywhere :D.What are you seeing when the server isn't working?
Is there a reason why Terminal.app might not work?
$ ssh brow.sh
(It starts, prints "Waiting for Firefox to connect")Then...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6de976]
goroutine 11 [running]:
browsh/interfacer/src/browsh.handleMouseEvent(0xc4203d3b00)
/home/travis/gopath/src/browsh/interfacer/src/browsh/tty.go:151 +0x36
browsh/interfacer/src/browsh.readStdin()
/home/travis/gopath/src/browsh/interfacer/src/browsh/tty.go:46 +0xd3
created by browsh/interfacer/src/browsh.TTYStart
/home/travis/gopath/src/browsh/interfacer/src/browsh/browsh.go:185 +0xf2
Connection to brow.sh closed.https://text.brow.sh/http://text.brow.sh/http://text.brow.sh...
This is a motherfuc
And it's fuckinIt reminds me of the txt-web app I created based on my html2text golang pkg. It takes a different (simpler and less sophisticated) approach- bottom up, no fancy rendering:
https://txt.gigawatt.io/jaytaylor.com
(Site source code: https://jaytaylor.com/txt-web)
Powered by the go html2text pkg: https://jaytaylor.com/html2text
Still, I think for all the major benefits of text-based browsing, Lynx, Links, and eLinks are still far preferable as lightweight solutions.
Linking to FF/Chrome's libs is certainly an option and I agree a better approach, it's just a learning curve I wasn't willing to invest in.
But nevertheless you might like Browsh's monochrome toggle: `ALT+m`
But Browsh isn't designed to give faster browsing for people that already have good internet, it's designed to offer complete access to the modern web for users on slow and/or expensive internet.
Heads up: on my Mac, browsh isn't properly resetting the tty when it crashes.
But anyway, it was just a suggestion, it's your project, you should feel free to do what you think is best for it.
Question: how will it work with CAPTCHAs?
[edit]: Ah, I notice now that the firefox in stable is too old anyway. Oh, well, never mind then :-)
https://html.brow.sh/https://milankragujevic.com/vip-drop-i-...
So what you need to do is install Browsh on a remote server along with Mosh. Then from your own personal computer you can use the Mosh client to get Browsh working, albeit, quite slowly, in your terminal.
So you don't need to touch Go at all.
Let me know if you want any help, I'd love to get you setup as, like I say, this is precisely what I made Browsh for.
Comes up with BrowserModifier Win32/Unwaders.B!ml detected.
Do you still get the warning with the latest v1.2.3? https://www.brow.sh/downloads/
Trojan:Win32/Fuery.B!cl | Severe
(I looked at repurposing Firefox’s renderer for Lynx back in the late 90s - primarily for the JS support - but marrying a mountain of complex C++ implementing a dynamic page to crufty old C with bake-at-parse pages was far beyond my abilities or motivation.)
Have not looked into it more than that. Since `browsh` depends on headless firefox, which is not in the termux default repository (it seems), I guess it won't work because termux does not have access to the firefox system app, if that even shits with the headless-functionality. (but here I'm just guessing, a work around may be available)
Would be cool to see working though.
--isn't a disk image --isn't an app --isn't source code
So what is it?
chmod+x browsh_1.2.3_darwin_amd64
and then run it ./browsh_1.2.3_darwin_amd64Sure what sort of contribution were you thinking?
Thanks :)
Sounds great, will bookmark for later.
html.brow.sh uses an invalid security certificate. The certificate is not trusted because the issuer certificate is unknown. The server might not be sending the appropriate intermediate certificates. An additional root certificate may need to be imported. Error code: SEC_ERROR_UNKNOWN_ISSUER
For some reason, it maxes out my CPU usage, all 4 cores full speed, on a simple webpage with some light javascript.
So a browser wrapper.
But even that is wrong. Development in fact continued for eight years until July 2017.
Lynx can render HTML5 web pages. Not sure what WebGL has to do with a web browser that is meant for terminal emulators. CSS is not supported in text browsers in general (not all of them are full-screen terminal applications) because it makes no sense - for decent text rendering, the browser needs to ignore style sheets and render in a way appropriate for text output.
Surely though just the sheer fact of CSS's `hidden` declaration has to be taken into account by any browser, text-based nor not? I've came to the conclusion that there just simply isn't a subset of modern web standards that you can adhere to and still use the web today. Our best option is just to piggy back off one of the major browsers that does all the hard work of keeping up with the rapidly changing technologies.
You can argue that using the CSS display property is a bad hack around the poor performance of adding/removing DOM elements, but the general problem of trying to automatically adapt a GUI application to terminal display does not change (having the GUI be emulated in HTML that is meant to be displayed in the GUI of the web browser just adds a layer of indirection, difficulty, and inefficiency). On the other hand, web pages that are really hypertext documents wrapped in useless and inaccessible JavaScript and CSS can have all of the event handlers and CSS properties ignored, and become legible again. This is something that text browsers do well, and why text browsers continue to be relevant today.
Are you saying that ignoring CSS rules for hidden content improves readability? I find this very hard to understand. For example something like "Thanks for submitting this form" appearing on page load is not an improvement to readability.
https://ftp.mozilla.org/pub/firefox/releases/
And it worked on a VPS with nothing X related installed
Edit: according to comments below the headless browser (i.e., the Firefox installation) runs on the server. After this, the smaller bandwith data gets sent directly over SSH.
I will keep browsh in mind when I'm again on some remote island. Could be a no brainer to install adhoc on a remote vm then.
But I have certainly experienced bad internet and felt that craving to be connected to the modern web, which is so hard when all you have is a 3kb/s connection.
So that is what Browsh is for, those people of the world, and there millions, who have slow and/or expensive internet.
Sigh, so I best remove 'WebGL' from the homepage :(
I tried it this morning (lineageOS). Got the arm binary from github, `chmod +x`-ed it on my computer and scp:ed it over to my phone. Ran the binary and got a quick flash of the screen and a `exit status 1` [in termux].
Have not looked into it more than that. Since `browsh` depends on headless firefox, which is not in the termux default repository (it seems), I guess it won't work because termux does not have access to the firefox system app, if that even shits with the headless-functionality. (but here I'm just guessing, a work around may be available)
Would be cool to see working though.
Is this relying on an external server to work?
- Sean Connery
So it's modern in that it won't run on anything but popular platforms, and text-based in that it shows you text using a huge, multi-gigabyte program. Looks like links / lynx aren't going to be replaced any time soon.
The modern age requires a multi-gigabyte program to use the Internet, that's just our reality. So the whole point of Browsh is that you can now offload this from your local machine (eg. to a remote VM) and re-experience the net as pure text, how it used to be.
In fact, just checked on Ubuntu 16.04 -- both links (2.12) and lynx (2.8.9...) work fine with https://google.com and https://news.ycombinator.com for example.
So, according to your own link, yes it should support SNI.
I use several clients that do not support SNI and one workaround is to connect through a program that does support it, e.g. haproxy, socat, etc.
Privacy/censorship conscious users may dislike SNI, SSL/TLS implementors are now trying to "fix" it, and in fact most SSL/TLS-enabled websites do not require SNI to be sent (popular browsers send it anyway). If requested, I can post stats on whether SNI is required for any list of websites. I have already done this a couple of times with the list all sites currently posted on HN: only a minority require SNI.
=== RELEASE 2.10 ===
[…]
Sat Jan 17 06:44:01 CET 2015 mikulas:
Enable SSL SNI, some servers need it
[…]Please don't do snarky tropes here.