Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: python
cache: pip
dist: bionic
python:
- "3.7"
- "3.8"
- "3.9"
install:
- pip install -r requirements.txt
- python setup.py install
script:
- ./start.sh --data-dir /tmp --connection-limit 16 &
- sleep 25; pkill -P $(pgrep start.sh); sleep 5
- python -bm tests
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include LICENSE
include README.md
include *.sh
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# MiNode
Python 3 implementation of the Bitmessage protocol. Designed only to route objects inside the network.
Python 3 implementation of the Bitmessage protocol. Designed only to route
objects inside the network.

## Requirements
- python3 (or pypy3)
- openssl

## Running
```
git clone https://github.com/TheKysek/MiNode.git
git clone https://github.com/g1itch/MiNode.git
```
```
cd MiNode
chmod +x start.sh
./start.sh
```

It is worth noting that the `start.sh` file MiNode no longer tries to do a `git pull` in order to update to the latest version.
Is is now done by the `update.sh` file.
It is worth noting that the `start.sh` script no longer tries to do a
`git pull` in order to update to the latest version.
Is is now done by the `update.sh` script.

## Command line
```
Expand Down Expand Up @@ -49,27 +50,34 @@ optional arguments:
Port of I2P SAMv3 bridge

```

## I2P support
MiNode has support for connections over I2P network.
To use it it needs an I2P router with SAMv3 activated (both Java I2P and i2pd are supported).
Keep in mind that I2P connections are slow and full synchronization may take a while.
To use it it needs an I2P router with SAMv3 activated
(both Java I2P and i2pd are supported). Keep in mind that I2P connections
are slow and full synchronization may take a while.

### Examples
Connect to both IP and I2P networks (SAM bridge on default host and port 127.0.0.1:7656) and set tunnel length to 3 (default is 2).
Connect to both IP and I2P networks (SAM bridge on default host and port
127.0.0.1:7656) and set tunnel length to 3 (default is 2).
```
$ ./start.sh --i2p --i2p-tunnel-length 3
```

Connect only to I2P network and listen for IP connections only from local machine.
Connect only to I2P network and listen for IP connections only from local
machine.
```
$ ./start.sh --i2p --no-ip --host 127.0.0.1
```
or
```
$ ./i2p_bridge.sh
```
If you add `trustedpeer = 127.0.0.1:8444` to `keys.dat` file in PyBitmessage it will allow you to use it anonymously over I2P with MiNode acting as a bridge.
If you add `trustedpeer = 127.0.0.1:8444` to `keys.dat` file in PyBitmessage it
will allow you to use it anonymously over I2P with MiNode acting as a bridge.

## Contact
- TheKysek: BM-2cVUMXVnQXmTJDmb7q1HUyEqkT92qjwGvJ
- g1itch: BM-NC4h7r3HGcJgqNuwSEpGcSiVij3BKuXa

## Links
- [Bitmessage project website](https://bitmessage.org)
Expand Down
2 changes: 1 addition & 1 deletion i2p_bridge.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
python3 minode/main.py --i2p --no-ip --host 127.0.0.1 "$@"
python3 -m minode.main --i2p --no-ip --host 127.0.0.1 "$@"
6 changes: 3 additions & 3 deletions minode/advertiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import threading
import time

import message
import shared
from . import message, shared


class Advertiser(threading.Thread):
Expand Down Expand Up @@ -35,7 +34,8 @@ def _advertise_addresses():
while not shared.address_advertise_queue.empty():
addr = shared.address_advertise_queue.get()
if addr.port == 'i2p':
# We should not try to construct Addr messages with I2P destinations (yet)
# We should not try to construct Addr messages
# with I2P destinations (yet)
continue
addresses_to_advertise.add(addr)
if len(addresses_to_advertise) > 0:
Expand Down
Loading