jgoerzen / pygopherd Goto Github PK
View Code? Open in Web Editor NEWMultiprotocol Gopher/Web Server [Python]
License: GNU General Public License v2.0
Multiprotocol Gopher/Web Server [Python]
License: GNU General Public License v2.0
THIS REPOSITORY IS OBSOLETE. Pygopherd development continues with the Python 3 version at: <https://github.com/michael-lazar/pygopherd> OLD readme follows: README for Pygopherd =========================================================================== QUICKSTART (Debian) ------------------- Use the .deb: dpkg -i pygopherd.deb or apt-get install pygopherd QUICKSTART (non-Debian) ----------------------- 1. Download and install Python 2.2 or above from www.python.org, if not already present on your system. You can run pygopherd either in-place (as a regular user account) or as a system-wide daemon. For running in-place, do this: 1. Modify conf/pygopherd.conf: * Set usechroot = no * Comment out (add a # sign to the start of the line) the pidfile, setuid, and setgid lines * Set mimetypes = ./conf/mime.types * Set root = to something appropriate. * Set port to a number greater than 1024. 2. Modify the first line of executables/pygopherd to reflect the location of your Python installation. 3. Invoke pygopherd by running: ./executables/pygopherd For installing: 1. Run python2.2 setup.py install 2. Make sure that the /etc/pygopherd/pygopherd.conf names valid users (setuid, setgid) and valid document root (root).
Hi John,
I use pygopherd on my server and I really love its ability to serve to both gopher and the web. Such a great idea.
I saw somewhere that you were attempting at one point to update it to python 3. Is that likely to happen? I've also noticed that the package is not in the Debian testing and unstable repositories (at least if I'm reading Debian's package pages correctly). So again, is Python 3 support likely?
Thanks!
When pygopherd is first started, things are okay. After it serves up something, then a zombie process appears. The next time it serves a page, that zombie is destroyed and a new zombie appears.
Using Debian 10 (buster) amd64 and version 2.0.18.4+nmu of pygopherd.
Allow gopher clients normal unrestricted access
Allow http clients only if a password defined in .htaccess is provided
Hello there, I am trying to create a simple one liner script in my gophermap like this;
=echo "Today's date is: $(date)"
However I can't figure out why using = isn't working for scripts like it should.
Is this implemented in PyGopherd? If it is, how do I enable it?
Thanks!
Hi,
I'm trying to use PYGhandler and generate a very simple print() just to see what happen
so far my file test.pyg looks like this
#!/usr/bin/python
print('test');
But I get this error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pygopherd/initialization.py", line 82, in handle
File "/usr/lib/python2.7/dist-packages/pygopherd/protocols/base.py", line 85, in handle
File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/UMN.py", line 60, in prepare
File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/dir.py", line 92, in prepare
File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/dir.py", line 66, in prep_entries
File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/HandlerMultiplexer.py", line 60, in getHandler
File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/base.py", line 110, in isrequestforme
File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/pyg.py", line 20, in canhandlerequest
AttributeError: 'module' object has no attribute 'PYGMain'
Am I missing something in my file ?
Thanks !
From the man page pygopherd(8)
(shortened):
The gophermap files contain two types of lines, which are described
here using the same convention normally used for command line argu-
ments. In this section, the symbol \t will be used to indicate a tab
character, Control-I.
full line of informational text
gophertypeDESCRIPTION [ \tselector [ \thost [ \tport ] ] ]
Note: spaces shown above are for clarity only and should not actually
be present in your file.
[…]
The second type of line represents a link to a file or directory. It
begins with a single-character Gopher type (see Gopher Item Types
below) followed immediately by a description and a tab character.
There is no space or other separator between the gopher type and the
description. The description may contain spaces but not tabs.
Following the paragraph on the second type of line, shouldn't be the grammar read like the following?
gophertypeDESCRIPTION \t [selector [ \thost [ \tport ] ] ]
It says „followed immediately by a description and a tab character“ while the grammar suggests the
tab character and selector can be omitted together.
Haven't yet had a chance to check how it is in the code, but needs a documentation fix either way.
The impact of this difference can be seen using the following example. Consider the following gophermap line:
i'm blue
With the grammar not requiring a tab after the description, this would become an info line with the text 'm blue
. If the tab was required however, it would become a info line with the text i'm blue
.
Suppose we have /var/gopher/gophermap
. Then /var/gopher/foo/gophermap
. An html link in the first gophermap
file will be handled correctly. In the second gophermap
, this is the result:
3'/foo/URL:http://www.foobar.com' does not exist (no handler found) error.host 1
Lord. :P Everything was going great and I've built a fairly large gopher hole @ gopher://20forbeers.com:70 and then I went and messed up permissions. Now, some of my /folders display 'Unable to access document' when I click on files and dirs that were accessible yesterday.
Yes, it was user error. Is there any documentation that talks about permissions; I think what stumped me up was the gopher:gopher for user:group, but I don't have a gopher user or group... or so I thought. Long story short I need a refresher in permissions, UID/GID for gopher dirs. HELP!
Its odd, too, any page with a gopher map displays my data... but the ones that are just dirs with files/texts/dirs inside of them don't allow to be navigated anymore. They did at one point. Any help would be really appreciated, and you can see the issue @ gopher://20forbeers.com:70. Thanks kindly!
When not having a gophermap file, and simply refer to a directory the directory will load fine.
But when trying to download something from the directory, it redirects users to the hostname of the server instead of the domain name.
Is there a way to fix this? I couldn't find anything in the config.
Of the ~user sort, so folks on multiuser unix servers could have a public_gopher directory in their /home. I can accomplish basically the same thing with symlinks into /var/gopher, but it may get aggravating having to do it manually at some point.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.