Wykres commitów

206 Commity (master)

Autor SHA1 Wiadomość Data
Jared Rewerts 1004777ed7 Switched to server side scrolling. 2018-08-20 21:57:43 -06:00
Árni Dagur 727d6ff293
Fix typo in default config 2018-08-05 14:22:14 +00:00
BO41 ad235b6c51 Use less verbose `if` statements (#166) 2018-08-04 19:55:37 +08:00
Thomas Buckley-Houston 855d8daa41 Use thread-safe map for HTTP requests
This fixes a race condition when may parallel requests are made to the
HTTP service
2018-08-02 19:26:09 +08:00
Thomas Buckley-Houston ec62ceaeac Remove "ms" from durations in HTTP response header 2018-08-02 15:56:25 +08:00
Thomas Buckley-Houston 4182af11fe Bump to v1.4.10 2018-07-27 13:20:18 +08:00
Thomas Buckley-Houston 4b1d6fc2d0 Include GOARM v7 in builds
Touches #134
2018-07-27 13:19:57 +08:00
Thomas Buckley-Houston 5829c71a3e Centralise all the Browsh build steps 2018-07-26 18:59:59 +08:00
Thomas Buckley-Houston 9abc3aaa3f Refactor build process to not use pre-built bins
This means that there's now a canonical script that allows other
distributers to build Browsh. The only caveat being that the web
extension cannot be built (Mozilla only allows one signed `.xpi` per
version), so it is downloaded.
2018-07-26 18:44:01 +08:00
Thomas Buckley-Houston d6afc206f1 v1.4.8 2018-07-25 11:23:51 +08:00
Thomas Buckley-Houston 4bf2f67410 Changes UA regex for Kube probe detection
Trying to stop Kubernetes' regular health check probes from loading
an actual raw text request.
2018-07-25 02:30:32 +08:00
Thomas Buckley-Houston 5aceb56d97 Changes default rate limiter to 'off' 2018-07-24 22:28:19 +08:00
Thomas Buckley-Houston 4fa867cafd Attempted fix for HTTP server's stuck requests
My hunch is that, since the switch to using brow.sh as the default
homepage, the extra page load time has an undesirable effect on
subsequent requests for new tabs. For example, say that a new tab
is requested but the original brow.sh tab hasn't completed, but
it does complete halfway through another tab loading. Might it retake
focus and prevent DOM load events triggering in the user-requested
tab?

So for now, the quickest fix is just to increase the wait time in the
tests. The better fix, if my hunch is right, would be to detect and
wait for the original launch-time tab to finish.
2018-07-24 21:28:14 +08:00
Thomas Buckley-Houston fb38943ceb Bump to v1.4.7 2018-07-24 15:58:50 +08:00
Thomas Buckley-Houston 1b71a0821d Adds Browsh vesion to TTY startup screen 2018-07-24 15:57:04 +08:00
Thomas Buckley-Houston 514260205c Page load and parsing durations in HTTP header 2018-07-24 15:54:45 +08:00
Thomas Buckley-Houston 2f713f40fc Ran linters to fix formatting 2018-07-24 13:30:51 +08:00
Thomas Buckley-Houston a8cff1bf1d Fixes 'no-text' bug in HTTP server's raw text
Such a big commit to provide a fix which really only involves a few
lines in the graphics builder. It would seem that the very first time
the BlockCharMono font is rendered it needs a little delay. So there's a
refactor here to use a callback when requesting a screenshot with text.

All the other code in this commit is just the scaffolding to try to fix
this issue. It's all good stuff in itself. Basically stricter code
triggers for the different stages of page load: tab load, DOM ready,
page ready. I actually wonder if the TTY page loads feel snappier now?

closes #46
2018-07-21 23:04:09 +08:00
Thomas Buckley-Houston 7a76b3d9aa First basic implementation of configurable keys
Only 'next-tab' is currently supported.

You will need to run Browsh with `--debug` then press the key
combination and watch the logs for something like;

`TTY sending: /stdin,{"char":"\u001c","key":28,"mod":2}`

That is the result of having `pressed CTRL+\`. Then add something
like the following to your config file:
```toml
[tty.keys]
next-tab = ["\u001c", "28", "2"]
```

touches #52
2018-07-21 17:05:02 +08:00
Thomas Buckley-Houston 7c10bd230e Replace google.com with brow.sh as startup URL
closes #132
2018-07-21 13:56:15 +08:00
Thomas Buckley-Houston 023836b69e Attempt to return empty 200s for Kube probes 2018-07-21 13:34:45 +08:00
Thomas Buckley-Houston 1b0d5f103f Provide Browsh version with git in Dockerfile
Version v1.4.6
2018-07-19 15:26:45 +08:00
Thomas Buckley-Houston 26416e267c Release: only delete `core` file if it exists 2018-07-19 14:49:27 +08:00
Thomas Buckley-Houston 949273a553 Remove "core" file in webpack dist/ during release
What is that file!!? It's only on Travis and its 201Mb!
2018-07-19 14:42:41 +08:00
Thomas Buckley-Houston 18099c0c86 List contents of webext/ during release script
Includes version bump to v1.4.3
2018-07-19 14:30:39 +08:00
Thomas Buckley-Houston 87aa7346b7 Bump version to trigger Mozilla release 2018-07-19 14:18:02 +08:00
Thomas Buckley-Houston a9425988af JS and Go formatting 2018-07-19 14:07:39 +08:00
Thomas Buckley-Houston 9318cbf282 Adds CLI arg to output version 2018-07-19 13:19:58 +08:00
Thomas Buckley-Houston e270dca8aa Refactor to keep Browsh version in Go 2018-07-19 13:14:59 +08:00
Thomas Buckley-Houston 976c811884 Don't use viper's FF path in `os.exec()`
Silly mistake. There's a few manipulations of `path` done before
calling `os.exec()`, so they need to passed on, not ignored!
2018-07-19 12:27:38 +08:00
Thomas Buckley-Houston e99a79b5fc Disable UPX compression 2018-07-18 19:57:27 +08:00
Thomas Buckley-Houston ec36c9c570 Show removable call to donate in TTY 2018-07-18 19:52:22 +08:00
Thomas Buckley-Houston 23702a2b4d Block user agents and domains using user config 2018-07-18 17:38:17 +08:00
Thomas Buckley-Houston 73c8bd94f3 Made all obvious variables user-configurable
There's a bit of refactoring in order for the webextension to deal with
the new order of initialisation now that config is sent by the Golang
client.

Closes #83
2018-07-18 15:55:35 +08:00
Thomas Buckley-Houston ef18913e3c First implementation of config file
Includes change of CLI args, many of been moved to the config file and
those that remain begin with `--` not `-` and may be worded differently.

Touches #37
2018-07-17 18:43:52 +08:00
Thomas Buckley-Houston 4b2ce6abbc Gofmt formatting 2018-07-17 10:10:08 +08:00
Thomas Buckley-Houston f05a21a339 Exclude windows files when running unit tests 2018-07-16 23:08:24 +08:00
Thomas Buckley-Houston 1017e8d000 Possible fix for windows path and crash issues
Touches #111 #117 #130
2018-07-16 22:29:10 +08:00
Thomas Buckley-Houston 527df8bb16 Fix for non-ASCII chars generating extra chars
This was caused by misunderstanding of the finer details of strings,
runes and slices. I just changed the input_box struct to use runes and
then followed the trail of type errors until input_boxes only ever used
strings to send their text outside themselves.

Closes #93
2018-07-16 17:58:53 +08:00
Thomas Buckley-Houston b2988bfa1f Fix for incorrectly calculated char dimensions
There was a bug where raw text pages would unusually truncated. It
seemed to coincide with the char dimensions being incorrectly
calculated. My only guess was that it was because of race condition on
lightweigh sites that didn't load Browsh's webextension code in time.

So for now it just seems better to hard code the char dimensions, which
should at least be more reliable than the bugs of dynamically
calculating them .
2018-07-16 13:56:24 +08:00
Thomas Buckley-Houston 79bd148a60 Add OpenBSD build
Touches #126 /cc @vext01
2018-07-14 21:25:29 +08:00
Thomas Buckley-Houston effa2acc77 Add `caveats` to Homebrew Tap about FF 57+ dep
Touches #65
2018-07-13 17:28:24 +08:00
Thomas Buckley-Houston 6471b6f42c Remove Firefox as a dep in Brew Tap recipe
Touches #65
2018-07-12 04:44:27 +08:00
Thomas Buckley-Houston 1bfb10f022 Don't UPX compress linux_arm64 binary 2018-07-11 18:04:12 +08:00
Thomas Buckley-Houston 21bd850f50 Missing `-` in goreleaser :/
Bump to v1.3.1
2018-07-11 17:55:35 +08:00
Thomas Buckley-Houston 5263897fb1 Add 386 and arm64 builds 2018-07-11 17:33:58 +08:00
Thomas Buckley-Houston 2fc0b5cde3 Formatted all Go code
Closes #97
2018-07-11 17:00:06 +08:00
Thomas Buckley-Houston be098c0673 Redirect HTML service requests for favicon.ico
... to a real favicon
2018-07-11 16:46:33 +08:00
Thomas Buckley-Houston 85affab04d Collapse recursive URLs to the HTML service
Eg; https://html.brow.sh/https://html.brow.sh/google.com
jsut becomes google.com
2018-07-11 16:39:35 +08:00
Thomas Buckley-Houston 3d0c224a6b Error if Firefox version is older than 57 2018-07-11 15:43:47 +08:00
Thomas Buckley-Houston 24c49213e2 Use `firefox | firefox-esr` as OR dep for .deb
Touches #103

Though note that currently Debian Stretch's Firefox version is 52,
which is not new enough for Browsh.
2018-07-11 15:20:33 +08:00
Thomas Buckley-Houston b8d031e498 Goreleaser: format default zip, override to binary
This is the wrong way round, it should default to binary as that's what
most of the OS's are and just set the zip override for `darwin`.

Watch this issue for updates:
https://github.com/goreleaser/goreleaser/issues/720
2018-07-11 15:05:37 +08:00
Thomas Buckley-Houston 3cc5485c2f Merge branch 'master' of github.com:browsh-org/browsh 2018-07-11 11:55:58 +08:00
Thomas Buckley-Houston b4c9f2d4e6 Added Homebrew Tap recipe 2018-07-11 11:55:19 +08:00
Thomas Buckley-Houston 3ee9b16ea8 Prevent mouse interaction crashing app
Possibly helps everyone in #63, #73 and #94

Whether it solves the issue or not, this definitely fixes a bug.
`CurrentTab` doesn't refer to anything until the first frame is received
from the webextension, yet tthe `handleMouseEvent` function can be
triggered long before that.
2018-07-11 11:30:22 +08:00
traBpUkciP a3b8c05b60 Use Backticks to Wrap String With Slashes
Oops. Quick fix.
2018-07-11 06:22:49 +07:00
traBpUkciP 78b021f822 Add Support for 64 bit Firefox Installations (#87)
Should fix up #87 and all the other related issues. Haven't wrote any golang for a year but I think it was a pretty simple fix so I took it on; however ff someone wouldn't mind giving it a second set of eyes that would be awesome. I'm stoked to try the app out, it's looks so cool :P

Cheers
2018-07-11 06:22:49 +07:00
Emiel Wiedijk d79b8810dc Check for $GOPATH
The shell script in interfacer/contrib/setup_go.sh expands the $GOPATH
variable to download a script to $GOPATH/bin. However, if $GOPATH is not
set, that expands to /bin. If the script is run with root privileges
(accidentally), this will download a "strange" executable to /bin, which
is supposed to be for system executables. If it is run without root
privileges, it gives an (unclear) error about permissions. This commit checks
if $GOPATH exists. If it $GOPATH does not exist, it exits with error code 1.
2018-07-11 06:21:23 +07:00
Thomas Buckley-Houston 65936913cb Don't use curl's --fail in setting up Browsh
Seems to fail every time
2018-07-10 10:44:34 +08:00
Thomas Buckley-Houston 74fd11ab7b Correct link on text.brow.sh home page 2018-07-10 09:11:06 +08:00
Thomas Buckley-Houston c457210c72 Refactor disallowed domains in HTTP service 2018-07-09 19:22:51 +08:00
Thomas Buckley-Houston 90078ff6c0 Add `--fail` and `set -e` when setting up Browsh
As per @zutto's suggestion in #62

This will at least notify us when something goes wrong during a Docker
build.
2018-07-09 19:21:25 +08:00
Thomas Buckley-Houston 29132f3695 Better attempt to fix Google phishing warnings 2018-07-09 13:51:58 +08:00
Thomas Buckley-Houston 384688302e Quick fix to stop Chrome detecting phishing
Apparently Google isn't happy about
https://html.brow.sh/mail.google.com URLs.
2018-07-09 13:06:50 +08:00
Thomas Buckley-Houston ba373e9815 Change 'texttop' refs to 'browsh' 2018-07-08 17:07:10 +08:00
Thomas Buckley-Houston 160a19ece8 Add arg for HTTP server bind address
Eg; `browsh -http-server-bind 127.0.0.1`

Fixes #57
2018-07-08 15:41:13 +08:00
Thomas Buckley-Houston 26fa4cb3de Use www.brow.sh's HTML service welcome page
It's nice to see the big Browsh logo rather just some boring plain text
2018-07-08 15:33:08 +08:00
Thomas Buckley-Houston 8d8168bfc6 First implementation of bg image for HTML service 2018-07-08 13:52:33 +08:00
Thomas Buckley-Houston 2ea4eb0f8c Better ENTER key UX
This came about from using Slack's web client.

Adding the input boxes padding to the DOM box coords makes the TTY
cursor more closely reflect the actual input box. Also using keyup/down
seems more universally applicable than merely kepress
2018-07-07 18:22:17 +08:00
Thomas Buckley-Houston 7f8893fe14 Add logo to TTY startup. README updates 2018-07-06 13:17:28 +08:00
Thomas Buckley-Houston 752f34ddb3 Redirect HTTP to HTTPS 2018-06-27 17:10:48 +08:00
Thomas Buckley-Houston 16f1917ed8 Basic application-level HTTP rate limiting
Here set to 10 requests per minute. Note that the current implementation
doesn't use a shared store across instances, so in effect clients can
request on average instances-count * 10 requests per minute.
2018-06-26 15:21:10 +08:00
Thomas Buckley-Houston c0c68842f0 Added gzip compression to HTTP server 2018-06-26 13:57:52 +08:00
Thomas Buckley-Houston 2e1de9dab1 Add 10min public cache to HTTP server 2018-06-25 22:06:29 +08:00
Thomas Buckley-Houston 4f637ccddc F1 key to open help tab
Closes #38
2018-06-23 19:27:55 +08:00
Thomas Buckley-Houston 3f6211c8a4 Added robots.txt to ignore everything but / 2018-06-23 19:27:55 +08:00
Thomas Buckley-Houston 70d3f45f60 Extra loggina and README updates 2018-06-23 19:27:15 +08:00
Thomas Buckley-Houston ea53e6b467 Return help message for / request on HTTP service 2018-06-18 20:00:29 +08:00
Thomas Buckley-Houston f0467b61c5 Don't log to STDOUT during HTTP server tests 2018-06-18 19:06:05 +08:00
Thomas Buckley-Houston ffbb182678 Log to STDOUT if running as HTTP service 2018-06-18 18:04:15 +08:00
Thomas Buckley-Houston c70083958f HTTP server: Use whole URI, including query 2018-06-17 21:40:16 +08:00
Thomas Buckley-Houston 3149db4bd3 Add anchor tags to HTTP Server output
This means you can now load the raw text in a browser and the resulting
page will have basic blue links that can be clicked on that will in turn
be loaded by the HTTP service.

A significant feature, so worthy of a minor version bump to;
v1.1.0
2018-06-17 21:26:44 +08:00
Thomas Buckley-Houston c9df161eb6 Don't UPX compress OSX binaries
The current versions of UPX cause an instant crash of the Browsh binary
on OSX :/

Version 1.0.13
2018-06-13 19:37:26 +08:00
Thomas Buckley-Houston fe2ac579a4 Make releases default to published and official 2018-06-12 20:54:10 +08:00
Thomas Buckley-Houston 375a7a16b1 Didn't use glob for freebsd UPX exclusion 2018-06-12 20:47:20 +08:00
Thomas Buckley-Houston 133e176646 Don't compress *any* freebsd binaries
... including ARM ones
2018-06-12 20:37:33 +08:00
Thomas Buckley-Houston c415547c5b Added ARM architecture builds
Touches #12
2018-06-12 19:42:00 +08:00
Thomas Buckley-Houston a8ea195087 Marionette startup: catch error rather than wait
It appears that Firefox doesn't always log its Marionette startup, so
instead this commit catches the network error when Marionette is yet to
start and just retries until Marionette is ready.
2018-06-12 19:38:39 +08:00
Thomas Buckley-Houston 2577ea896b Fixes to get the Docker image building again
Firstly Firefox 60 now throws an error if its run as root inside a
user's home path. Which is great because that revelead my naivety about
using `RUN su user` in the Dockerfile. So now Firefox is running as a
non-root user inside Docker which is what was always best.

Also it turns out that the crude 3 second wait at startup hoping that
Firefox's Marionette had started listening, wasn't good enough. So now
we're actually listening for a log message to know when it's started
now.

Finally make all startup methods use a the post-webext connection state
to send the startup URL to the browser, the other methods just seemed to
flakey.

Includes version bump to 1.0.9
2018-06-12 15:40:49 +08:00
Thomas Buckley-Houston c13e8d26f6 Use absolute path to webextension.go asset
Bump to version 1.0.8
2018-06-11 16:28:00 +08:00
Thomas Buckley-Houston 47bcbbc0a6 Version 1.0.5
Adjust path in .goreleaser.yml

Boot Firefox before any tests to get any 'first launch' behaviour out of
the way.

Remove pacman build as we're using nfpm instead of fpm now.
2018-06-11 14:11:45 +08:00
Thomas Buckley-Houston 0109fa206e Move .goreleaser.yml file 2018-06-10 22:47:49 +08:00
Thomas Buckley-Houston 05c2d9f4f3 Version 1.0.2
Update Firefox version dependency to 60.0
2018-06-10 22:30:44 +08:00
Thomas Buckley-Houston 2f72159670 Goreleaser: replace fpm with nfpm 2018-06-10 21:01:25 +08:00
Thomas Buckley-Houston 98fa8014b9 Added Firefox paths for Windows and OSX
Also updated Gopkg dep versions.

And version bump to 1.0.0pre1!
2018-06-10 20:16:28 +08:00
Thomas Buckley-Houston d6406ac734 Don't forward keypresses when URL box is active
This fixes a bug where pressing return after entering a new URL would
forward the ENTER key to the DOM and sometimes trigger the focussed
result in a Google search.
2018-06-05 16:30:07 +08:00
Thomas Buckley-Houston 12c8a58868 Prevent crash when keys pressed during boot screen 2018-06-05 16:11:46 +08:00
Thomas Buckley-Houston e937f81a60 Added shortcut to toggle a mobile user agent 2018-06-05 14:40:03 +08:00
Thomas Buckley-Houston 5b575110b1 Include role="textbox" elements as an input boxes
This just about allows you to use Gmail
2018-06-04 21:29:43 +08:00
Thomas Buckley-Houston 7232ac120f Bug fix: improved line formatting
There was a long standing problem where random gaps would appear
between lines. The fix was to change a magic number that adds an extra
few pixels to the reported height of the 'em' character dimensions.
Unfortunately I don't know what this magic number actually does. It
might represent the distance between lines?
2018-06-04 17:02:15 +08:00