Coder Social home page Coder Social logo

eyedeekay / eephttpd Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 2.0 6.93 MB

Serving simple static sites directly to i2p via the SAM API. (Also part of https://github.com/eyedeekay/sam-forwarder)

License: GNU General Public License v3.0

Go 40.79% Dockerfile 0.16% Makefile 2.88% CSS 2.81% HTML 53.06% Shell 0.29%
i2p sam-api http-server static-website

eephttpd's Introduction

eephttpd

STATUS: This project is maintained. I will respond to issues, pull requests, and feature requests within a few days. I am primarily fixing bugs.

So much for a simple static file server.

eepHttpd is a web hosting tool for content in I2P, I2P sites, and I2P torrents. On it's own, it's basically a static directory server with limited scripting abilities written in pure-Go.

However, it responds differently to different kinds of interaction.

  1. If a Git client attempts to access it, then they will be able to clone the entire site, up from the document root(So Use this for things You want to SHARE ANONYMOUSLY with a large audience, not for things you want to keep secret.) This allows people to clone the site in order to mirror it.
  2. When any file is changed in the docroot, eephttpd generates a multi-file torrent of the site and places it in the docroot under the file name eephttpd.torrent. This allows people to mirror the site's exact content, and participate in keeping the site's content up.
  3. When a browser with I2P in Private Browsing connects to it, it creates a magnet link and replies with it as an X-I2P-TORRENTLOCATION header. In this way, the browser can help the user download the whole web site using Bittorrent and substitute HTTP resources for Bittorrent resources when they are ready.
  4. If a Torrent client attempts to access the /a URL, it is forwarded to an Open Torrent Tracker. Every single eephttpd site is also an open torrent tracker. Moreover, every single eephttpd site treats itself as the primary tracker for the whole-site torrent it generates. This is intended to encourage the distribution of open trackers on I2P.

So... more to come on why this is cool.

In order to build a .deb file, either use checkinstall or run:

    go mod vendor
    make orig
    debuild -us -uc

or just run:

    make deb

eephttpd's People

Contributors

eyedeekay avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

eephttpd's Issues

stack overflow when running eephttpd

hey, I'm trying to use eephttpd with go1.19 and ubuntu 22.04 and it gives a stack overflow error due to recursion.

how I built it:

go get github.com/eyedeekay/eephttpd/eephttpd
cd eephttpd
go build

then (in eephttpd dir):

./eephttpd -d ~/website/ -f ../etc/eephttpd/eephttpd.conf 
2022/08/26 22:14:25 Found Labels: []
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc020286360 stack=[0xc020286000, 0xc040286000]
fatal error: stack overflow

runtime stack:
runtime.throw({0xbd6ba6?, 0x1141500?})
	/usr/local/go/src/runtime/panic.go:992 +0x71
runtime.newstack()
	/usr/local/go/src/runtime/stack.go:1101 +0x5cc
runtime.morestack()
	/usr/local/go/src/runtime/asm_amd64.s:547 +0x8b

goroutine 1 [running]:
github.com/eyedeekay/sam-forwarder/config.(*Conf).Get(0xc00022a300?, {0xbba1e1?, 0x3?}, {0x0?, 0x0?, 0x0?})
	/root/go/pkg/mod/github.com/eyedeekay/[email protected]/config/tunconf.go:141 +0x12c fp=0xc020286370 sp=0xc020286368 pc=0x70e94c
github.com/eyedeekay/sam-forwarder/config.(*Conf).Get(0x0?, {0xbba1e1?, 0x0?}, {0x0?, 0x0?, 0x0?})
	/root/go/pkg/mod/github.com/eyedeekay/[email protected]/config/tunconf.go:149 +0xff fp=0xc0202863b0 sp=0xc020286370 pc=0x70e91f

// etc
...additional frames elided...

not sure exactly why this is happening, first I thought it was because I wasn't passing an ini file (https://github.com/eyedeekay/sam-forwarder/blob/master/config/tunconf.go#L149) but that didn't make a difference. any help is much appreciated :)

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.