Giter Site home page Giter Site logo

crossbowerbt / dillo-plus Goto Github PK

View Code? Open in Web Editor NEW
88.0 13.0 10.0 2.93 MB

A lightweight web browser based on Dillo but with many improvements, such as: support for http, https, gemini, gopher, epub, reader mode and more...

License: GNU General Public License v3.0

Makefile 1.10% C 29.42% HTML 2.70% Perl 0.18% Python 0.41% Shell 0.90% C++ 61.28% Hack 0.05% CSS 0.04% Max 3.93%
browser epub epub-reader gemini gemini-client gemini-protocol gopher gopher-client gopher-protocol http-client

dillo-plus's People

Contributors

crossbowerbt avatar eblanca avatar lumidify avatar paculino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dillo-plus's Issues

Failing to parse non-existent certificates on Mac OS

I am running Mac OS Big Sur on MacBook Air M1 2020. See #11 (comment) for more details on how I built Dillo+.

Whatever website I open, Dillo+ complains on failing to parse some certificates.

Failed to parse certificates from /etc/ssl/certs/ca-certificates.crt
Failed to parse certificates from /etc/pki/tls/certs/ca-bundle.crt
Failed to parse certificates from /usr/share/ssl/certs/ca-bundle.crt
Failed to parse certificates from /usr/local/share/certs/ca-root.crt
Loaded TLS certificates.

Running file on these files tells that that they simply do not exist. Well, it makes sense for Dillo+ to not be able to parse them. But why does it try to? Is that a bug?

See the terminal printout:
=> https://gist.github.com/bouncepaw/2bb2a907a475fd2d4e604c978bbece16

Insta crash on OpenBSD PowerPC 32-bit

It compiled succesfully, I renamed Makefile.options.OpenBSD to Makefile.options.
Nothing happens when I launch.

I run in terminal and see it crashes. Error output:
assertion "tbInfo" failed: file "ooffloatsmgr.cc", line 1095, function "getOOFAwareWidget"

STDERR errors

I have dillo installed from packages and I have just compiled dillo-plus.
dillo from packages:

> dillo
dillo_dns_init: Here we go! (threaded)
Disabling cookies.
Nav_open_url: new url='about:splash'
a_Dicache_cleanup: length = 0

dillo-plus:

/tmp/dillo-plus (main)> mv Makefile.options{,._}
/tmp/dillo-plus (main)> mv Makefile.options{.OpenBSD,}
/tmp/dillo-plus (main)> make
/tmp/dillo-plus (main)> ./src/dillo
Cannot open /usr/local/etc/dillo/dillorc: No such file or directoryRead error from /home/v11e/.dillo/dillorc: Bad file descriptorError closing files Bad file descriptorCannot open /usr/local/etc/dillo/bm.txt: No such file or directoryRead error from /home/v11e/.dillo/bm.txt: Bad file descriptorError closing files Bad file descriptorCannot open /usr/local/etc/dillo/keysrc: No such file or directoryRead error from /home/v11e/.dillo/keysrc: Bad file descriptorError closing files Bad file descriptorCannot open /usr/local/etc/dillo/domainrc: No such file or directoryRead error from /home/v11e/.dillo/domainrc: Bad file descriptorError closing files Bad file descriptordillo_dns_init: Here we go! (threaded)
Loaded TLS certificates.
Disabling cookies.
Cannot open /usr/local/etc/dillo/hsts_preload: No such file or directoryRead error from /home/v11e/.dillo/hsts_preload: Bad file descriptorError closing files Bad file descriptorNav_open_url: new url='about:splash'
 
  1. missing newlines
  2. Cannot open /usr/local/etc/dillo/dillorc: No such file or directory, Cannot open /usr/local/etc/dillo/bm.txt: No such file or directory, Cannot open /usr/local/etc/dillo/keysrc: No such file or directory, Cannot open /usr/local/etc/dillo/domainrc: No such file or directory, Cannot open /usr/local/etc/dillo/hsts_preload: No such file or directory
    I guess, /usr/local/etc isn't used in OpenBSD at all - and I have several hundred packages installed:
> file /usr/local/etc
/usr/local/etc: cannot stat '/usr/local/etc' (No such file or directory)

whereas > locate dillorc shows /etc/dillo/dillorc.
3. Read error from /home/v11e/.dillo/dillorc: Bad file descriptor, Read error from /home/v11e/.dillo/bm.txt: Bad file descriptor, Read error from /home/v11e/.dillo/keysrc: Bad file descriptor, Read error from /home/v11e/.dillo/domainrc: Bad file descriptor, Read error from /home/v11e/.dillo/hsts_preload: Bad file descriptor
the files are empty - 0 bytes each:

> ll ~/.dillo
total 4
-rw-r--r--  1 v11e  v11e     0B Mar 19 19:21 bm.txt
-rw-------  1 v11e  v11e    13B Dec  6 22:42 cookiesrc
-rw-r--r--  1 v11e  v11e     0B Mar 19 19:21 dillorc
-rw-r--r--  1 v11e  v11e     0B Mar 19 19:21 domainrc
-rw-r--r--  1 v11e  v11e     0B Mar 19 19:21 hsts_preload
-rw-r--r--  1 v11e  v11e     0B Mar 19 19:21 keysrc

Upon 2nd and subsequent launch, those verbose errors are gone:

/tmp/dillo-plus (main)> ./src/dillo
dillo_dns_init: Here we go! (threaded)
Loaded TLS certificates.
Disabling cookies.
Nav_open_url: new url='about:splash'
	

Reader Mode using rdrview

The https://github.com/eafer/rdrview project is an implementation of Firefox's Reader View as a command line tool. It's written in C, and seems to work well.

I think an option to use rdrview, in combination with the exiting user mode CSS would be a really useful feature. It does a great job of distilling the page's HTML into a much simpler version (rdrview --html for html output) - which would be much more predictable and vastly simpler to style using user/reader mode CSS.

Missing dependencies (debian-based)

Hello, this may not be the case on other systems, but on Debian-based systems at least (I am on Devuan 5 migrated from Debian 12), the list of dependencies is inadequate.

Dependencies I had to install on an amd64 system (including the dependencies which did not conflict with other packages) were:
libiconv-hook1:amd64
libfltk-forms1.3:amd64
libfltk-images1.3:amd64
fluid:amd64
libfltk-cairo1.3:amd64
libfltk1.3-dev:amd64
libglx-dev:amd64
libgl-dev:amd64
libopengl-dev:amd64
libglu1-mesa-dev:amd64
libssl-dev:amd64
libxrender-dev:amd64
libxfixes-dev:amd64
libxcursor-dev:amd64
libxext-dev:amd64
**libxinerama-dev:amd64
libfontconfig1-dev:amd64
libxft-dev:amd64
libfontconfig-dev:amd64

The last four I had some trouble with, so installed with apt download and dpkg --force-all -i *.deb when in the directory I was installing from. I also already had dillo installed from the OS repo, so that may have taken care of some packages. This isn't really a problem, since the errors when running make install will show what needs installed (or at least searched for with apt find), but it might be helpful to include them in the build dependencies. I bolded the ones which threw errors leading to the correction.

make fails on mac os

tls.c:48:10: fatal error: 'openssl/err.h' file not found
#include <openssl/err.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [tls.o] Error 1
make[1]: *** [recurse_into_IO] Error 2
make: *** [all] Error 2

brew install openssl does not help

$ sw_vers
ProductName:	macOS
ProductVersion:	11.4
BuildVersion:	20F71

[idea] HTML Regex Substitution Feature

Whether I'm using dillo+ or not, I often come across instances when it would be helpful to find-and-replace within html prior to rendering, whether it be global and automatic, or manually applied. For instance, it is often helpful to redirect urls to alternative frontends (such as is possible in browsers such as firefox/icecat with the privacy-redirect extension). This is especially true here as there is no javascript, but the redirect must be manually done except when starting from these alternatives already. In addition to utilitarian redirects for frontends, it would allow redirecting to a preferred wikipedia theme/skin without signing in, or do something humorous like the xkcd substitutions.

If manual only, it could be accessed from the tools menu, or perhaps using ^h, as is common in programs with replace features. If global/automatic, it might be accessed similarly, or from within dillorc.

If in dillorc, the substitutions might be defined by something like sed_command='[command(s)]', then dillo could run sed from the system with the variable from dillorc being the command(s). This would ensure the substitution behavior matches with what the user is accustomed to.

[idea] library or(and) SDL2

Dillo is very good. But it is still not in library form. Adding dillo to wxwidgets, to C gtk or QT would change usage a lot.

Many projects don't want to link to JavaSscript for security reasons. Such a library would give a powerful boost to the use of this browser.

I dream about Electron in C and Dillo.

Cookies freeze the whole browser

Hello,
Yesterday I had my Debian's dillo installed, and I was just running dillo-plus from the src/ directory.

Today, I apt remove dillo, and I installed dillo-plus with "make install".

After that, Dillo+ is using its own libraries, and apparently websites that use cookies freeze the browser.

I have even reverted my changes (that I pulled) and with commit 82f6faa as head, I get the following output:

user@debian:~/git/kuchikuu/dillo-plus/src$ ./dillo http://localhost:7777/setcookie_test.php
Domain: Default deny.
dillo_dns_init: Here we go! (threaded)
Loaded TLS certificates.
Enabling cookies as from cookiesrc...
Nav_open_url: new url='http://localhost:7777/setcookie_test.php'
Dns_server [0]: localhost is 127.0.0.1
Connecting to 127.0.0.1:7777
cookies.c: a_Dpi_send_blocking_cmd cmd = {<cmd='get_cookie' scheme='http' host='localhost' path='/setcookie_test.php' '>}
Dpi_check_dpid: check_st=1
Dpi_check_dpid: OK
Dpi_get_server_port: server_name = [cookies]
[<cmd='check_server' msg='cookies' '>]
Dpi_get_server_port: rply=<cmd='send_data' msg='5031' '>
Dpi_get_server_port: port_str=5031
Dpi_connect_socket: server=cookies port=5031

I did

sed -i 's/_MSG/MSG/g' cookies.c menu.cc IO/dpi.c

in the src/ directory before compiling to see the messages

The php page that freezes the browser is this:
(This is just an example to reproduce the issue. Any website that uses the cookies (with coockiesrc ALLOW) will freeze the browser. It's just that everything is disabled by default so we didn't see an issue. )

<?php
	setcookie("aaa","bbb", time()+2*24*60*60);
?>
<html>
<body>
<?php
	echo "Cookie: " . $_COOKIE["aaa"];
	echo "<br><br>";
	echo "All cookies: " . json_encode($_COOKIE);

?>
</body>
</html>```

Search macros/menu options using gemini fail

I did not notice initially as I don't tend to think about gemini unless on a site which has a gemini search engine linked, but it appears that while rendering gemini and gopher links is very doable, using their search engines in the list breaks things now. For the s-menu gui list of search engines, it causes an off-by-one (or more, in some cases, depending on number of engines) error, so that the last option is not available. For the url/search bar macro and the gui, the search does not function, even if the site otherwise does.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.