Verified Commit 0678a5b5 authored by roebert's avatar roebert 👻
Browse files

Merge branch 'master' into simple-dht-example

parents 37402449 d9ce21c5
Pipeline #57783 passed with stages
in 9 minutes and 59 seconds
......@@ -31,6 +31,21 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-
## [0.4.1] - 2021-03-11
### Changed
- Dependencies were updated.
### Fixed
- Fixed an NPE when requesting a port forwarding if the Internet Gateway Device responds with an
error.
- Since the super peer sp-ham1 has connectivity problems, this has been replaced by the sp-fra1.
- Public and private keys are now displayed everywhere in the classic format.
- Unused dependencies removed.
- Some additional minor fixes.
## [0.4.0] - 2021-02-27
### Added
......@@ -42,8 +57,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- When changing the network, new port mappings are now automatically created on the new network.
- `DrasylNode`'s API has been enhanced with `@NotNull` and `@Nullable` annotations.
- Messages that can be delivered within the same JVM are now passed by reference (previously these
messages have been unnecessarily serialized).
**So make sure you either send copies of your objects or it's
messages have been unnecessarily serialized).
**So make sure you either send copies of your objects or it's
fine for other nodes to make changes to that object.**
- Static routes to other remote peers can now be defined. This allows discovery to be omitted in
static environments (or test setups).
......@@ -59,7 +74,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Changed
- By default, each node now listens on a port in the range 22528 and 65528, which is derived from
- By default, each node now listens on a port in the range 22528 and 65528, which is derived from
its identity. This means that the chance for a port collision is now reduced when
multiple nodes are running on one computer.
- UDP is now used instead of TCP for communication with remote peers.
......@@ -69,7 +84,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Documentation has been revised (Javadoc and/or documentation at https://docs.drasyl.org).
- Messages can now be additionally serialized by protobuf or Java. Furthermore, own serializers can
be implemented. Read more at https://docs.drasyl.org.
- The third-party portmapper library has been replaced with our own more lightweight
- The third-party portmapper library has been replaced with our own more lightweight
and more resilient implementation.
- All dependencies have been updated to the latest versions.
......
# drasyl
[<img src="https://docs.drasyl.org/master/assets/img/logo.svg" alt="drasyl" width="200"/>](https://drasyl.org)
[Website](https://drasyl.org) |
[Documentation](https://docs.drasyl.org) |
[Contributing](CONTRIBUTING.md) |
[Changelog](CHANGELOG.md)
[![Build Status](https://git.informatik.uni-hamburg.de/sane-public/drasyl/badges/master/pipeline.svg)](https://git.informatik.uni-hamburg.de/sane-public/drasyl/-/pipelines)
[![LGPL v3](https://img.shields.io/badge/license-LGPL%20v3-blue)](https://www.gnu.org/licenses/lgpl-3.0)
......@@ -8,68 +13,43 @@
[![Chocolatey](https://img.shields.io/chocolatey/v/drasyl)](https://chocolatey.org/packages/drasyl)
[![Gitter](https://badges.gitter.im/drasyl-overlay/drasyl.svg)](https://gitter.im/drasyl-overlay/drasyl)
drasyl is a general-purpose overlay network framework for rapid development of distributed P2P applications.
# drasyl
drasyl is a general-purpose overlay network framework for rapid development of distributed P2P
applications.
By using drasyl developers can fully concentrate on creating distributed applications.
With drasyl, boundaries between IP-based networks will be eliminated and secure communication channels between any peers will be provided.
Zero-configuration is required to use drasyl.
Developers can run a new drasyl node without having to write configuration files or provide IP addresses of peers.
By using drasyl developers can fully concentrate on creating distributed applications. With drasyl,
boundaries between IP-based networks will be eliminated and secure communication channels between
any peers will be provided. Zero-configuration is required to use drasyl. Developers can run a new
drasyl node without having to write configuration files or provide IP addresses of peers.
![drasyl architecture](https://docs.drasyl.org/master/assets/img/drasyl-architecture.png)
_As drasyl is primarily developed for the research project
[Smart Networks for Urban Participation (SANE)](https://sane.city/) and focuses on functionalities necessary for the project. However, drasyl is open to
contributions made by the community._
## Maven/Gradle Dependencies
Maven:
```xml
<dependency>
<groupId>org.drasyl</groupId>
<artifactId>drasyl-core</artifactId>
<version>0.3.0</version>
</dependency>
```
Gradle:
```compile group: 'org.drasyl', name: 'drasyl-core', version: '0.3.0'```
## Standalone Command Line Interface
There is a drasyl command line interface with some utilities that can be found on the releases page: https://github.com/drasyl-overlay/drasyl/releases
It is also available in docker:
```docker run drasyl/drasyl help```
## Create and Start drasyl Node
```java
DrasylNode node = new DrasylNode() {
@Override
public void onEvent(Event event) {
// handle incoming events (messages) here
System.out.println("Event received: " + event);
}
};
node.start();
// wait till NodeOnlineEvent has been received
[Smart Networks for Urban Participation (SANE)](https://sane.city/) and focuses on functionalities
necessary for the project. However, drasyl is open to contributions made by the community._
// send message to another node
node.send("0229041b273dd5ee1c2bef2d77ae17dbd00d2f0a2e939e22d42ef1c4bf05147ea9", "Hello World");
# Features
// shutdown node
node.shutdown();
```
* Provides Communication Channels between any two Nodes (on the Internet).
* Automatic Discovery of Peers running within same Process, Computer, LAN, or the Internet.
* Automatic Handover to most local Communication Channel.
* Overcomes Network Barriers (Statefull Firewalls, NATs).
* UDP Hole Punching.
* Port Mapping (UPnP-IGD, NAT-PMP, PCP).
* Reacts to Network Changes.
* Asynchronous and Event-Driven.
* Lightweight.
* Extensible.
## Documentation
# Usage & Documentation
More information can be found in the [documentation](https://docs.drasyl.org).
* [Getting Started](https://docs.drasyl.org/getting-started/)
* [Configuration](https://docs.drasyl.org/configuration/)
* [JavaDoc](https://www.javadoc.io/doc/org.drasyl/drasyl-core/latest/index.html)
* [Command Line Interface](https://docs.drasyl.org/cli/)
* [Chat](https://gitter.im/drasyl-overlay/drasyl)
-------------------------------------
_Licensed under [GNU Lesser General Public License v3.0](LICENSE)_
# License
_Inspired by [ZeroTier's Peer to Peer Network](https://www.zerotier.com/manual/#2_1)_
This is free software under the terms of the [GNU Lesser General Public License v3.0](LICENSE)
......@@ -15,7 +15,7 @@ mvn clean release:prepare
An additional call of `mvn release:perform` is not necessary! GitLab CI performs this tasks automatically.**
* Wait for the GitLab CI to complete then.
* Deploy the new version to the [public super peer](https://production.env.drasyl.org/) by starting the manual `production` job on the GitLab CI pipeline corresponding to the release.
* Deploy to our public super peers (this is a manual process).
* Release to Maven Central Repository by logging into the [Sonatype OSSRH Nexus Repository Manager](https://oss.sonatype.org), going to the "Staging Repositories" tab, and closing the corresponding release. Wait for the checks, then refresh and click "Release".
* Create Release on GitHub:
* Go to https://github.com/drasyl-overlay/drasyl/releases.
......@@ -40,6 +40,7 @@ docker push drasyl/drasyl:latest
```
* Re-add the nightly/snapshot information to the [getting-started.md](docs/content/getting-started.md) and the [index.md](docs/content/index.md).
* Update the Homebrew Formula: https://github.com/drasyl-overlay/homebrew-drasyl/blob/main/Formula/drasyl.rb.
* Push the new version to chocolatey. For instructions see this repo: [https://github.com/drasyl-overlay/drasyl-choco](https://github.com/drasyl-overlay/drasyl-choco/blob/master/RELEASE.md)
## Making a manual build of docker
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1137px" height="1077px" viewBox="46 46 1137 1077" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<!-- Generated by Pixelmator Pro 2.0.5 -->
<g id="Logo">
<defs>
<path id="Unten" d="M706.689 560.317 C655.258 533.651 572.074 533.172 520.894 559.248 L118.253 764.392 C67.073 790.468 67.275 833.225 118.706 859.891 L523.311 1069.677 C574.742 1096.343 657.926 1096.822 709.106 1070.745 L1111.747 865.602 C1162.927 839.526 1162.725 796.769 1111.294 770.103 Z"/>
</defs>
<use id="Unten-1" xlink:href="#Unten" fill="#ffffff" fill-opacity="1" stroke="none"/>
<defs>
<path id="stroke-path" d="M627.828 1104.828 L641.234 1103.984 660.719 1101.531 679.672 1097.531 697.656 1092 711.734 1086.188 1118.938 878.781 1132.047 871.094 1138.875 866.094 1146.469 859.313 1151.641 853.563 1157.063 845.891 1160.469 839.313 1163.516 830.641 1164.953 821.469 1164.688 812.234 1162.75 803.156 1159.219 794.453 1154.344 786.375 1149.609 780.375 1142.594 773.297 1136.297 768.094 1127.203 761.875 1118.422 756.922 713.359 546.891 703.938 542.422 692.422 537.891 680.359 534.047 667.875 530.906 655.063 528.438 642.016 526.656 628.734 525.5 612.156 525 598.781 525.328 585.547 526.328 572.5 527.969 559.703 530.281 547.234 533.297 535.203 537 523.719 541.391 514.328 545.766 111.188 751.172 102.453 756.031 93.375 762.172 87.094 767.328 80.109 774.359 75.406 780.328 70.625 788.281 67.781 795.078 65.578 803.766 64.953 811.031 65.625 820.047 67.969 829.063 71.875 837.672 77.094 845.609 82.047 851.484 89.359 858.438 95.813 863.484 102.859 868.172 111.563 873.094 516.625 1083.125 526.047 1087.594 537.625 1092.156 552.656 1096.797 565.313 1099.781 581.375 1102.547 594.641 1104.016 611.203 1104.922 Z"/>
</defs>
<use id="Unten-2" stroke="#009485" stroke-opacity="1" stroke-linecap="round" fill="none" stroke-width="30" xlink:href="#stroke-path"/>
<defs>
<path id="Mitte" d="M706.689 330.317 C655.258 303.651 572.074 303.172 520.894 329.248 L118.253 534.392 C67.073 560.468 67.275 603.225 118.706 629.891 L523.311 839.677 C574.742 866.343 657.926 866.822 709.106 840.745 L1111.747 635.602 C1162.927 609.526 1162.725 566.769 1111.294 540.103 Z"/>
</defs>
<use id="Mitte-1" xlink:href="#Mitte" fill="#ffffff" fill-opacity="0.599" stroke="none"/>
<defs>
<path id="stroke-path-1" d="M627.828 874.828 L641.234 873.984 660.719 871.531 679.672 867.531 697.656 862 711.734 856.188 1118.938 648.781 1132.047 641.094 1138.875 636.094 1146.469 629.313 1151.641 623.563 1157.063 615.891 1160.469 609.313 1163.516 600.641 1164.953 591.469 1164.688 582.234 1162.75 573.156 1159.219 564.453 1154.344 556.375 1149.609 550.375 1142.594 543.297 1136.297 538.094 1127.203 531.875 1118.422 526.922 713.359 316.891 703.938 312.422 692.422 307.891 680.359 304.047 667.875 300.906 655.063 298.438 642.016 296.656 628.734 295.5 612.156 295 598.781 295.328 585.547 296.328 572.5 297.969 559.703 300.281 547.234 303.297 535.203 307 523.719 311.391 514.328 315.766 111.188 521.172 102.453 526.031 93.375 532.172 87.094 537.328 80.109 544.359 75.406 550.328 70.625 558.281 67.781 565.078 65.578 573.766 64.953 581.031 65.625 590.047 67.969 599.063 71.875 607.672 77.094 615.609 82.047 621.484 89.359 628.438 95.813 633.484 102.859 638.172 111.563 643.094 516.625 853.125 526.047 857.594 537.625 862.156 552.656 866.797 565.313 869.781 581.375 872.547 594.641 874.016 611.203 874.922 Z"/>
</defs>
<use id="Mitte-2" stroke="#009485" stroke-opacity="1" stroke-linecap="round" fill="none" stroke-width="30" xlink:href="#stroke-path-1"/>
<defs>
<path id="Oben" d="M706.689 100.323 C655.258 73.657 572.074 73.178 520.894 99.255 L118.253 304.398 C67.073 330.474 67.275 373.231 118.706 399.897 L523.311 609.683 C574.742 636.349 657.926 636.828 709.106 610.752 L1111.747 405.608 C1162.927 379.532 1162.725 336.775 1111.294 310.109 Z"/>
</defs>
<use id="Oben-1" xlink:href="#Oben" fill="#ffffff" fill-opacity="0.396" stroke="none"/>
<defs>
<path id="stroke-path-2" d="M627.828 644.828 L641.234 643.984 660.719 641.531 679.672 637.547 697.672 632.016 711.734 626.172 1118.938 418.781 1132.047 411.094 1138.875 406.094 1146.453 399.313 1151.625 393.578 1157.063 385.891 1160.469 379.328 1163.516 370.641 1164.953 361.469 1164.688 352.234 1162.75 343.156 1159.219 334.453 1154.344 326.391 1149.609 320.391 1142.594 313.297 1136.297 308.094 1127.203 301.875 1118.422 296.922 713.359 86.891 703.938 82.422 692.406 77.891 680.359 74.063 667.875 70.906 655.063 68.453 642.016 66.656 628.734 65.5 612.141 65.016 598.781 65.344 585.547 66.344 572.5 67.984 559.703 70.297 547.234 73.313 535.203 77 523.703 81.406 514.313 85.781 111.188 291.172 102.453 296.031 93.375 302.172 87.094 307.328 80.094 314.359 75.406 320.359 70.641 328.281 67.781 335.063 65.578 343.766 64.953 351.031 65.625 360.078 67.969 369.078 71.875 377.672 77.094 385.625 82.047 391.484 89.375 398.453 95.828 403.484 102.859 408.172 111.563 413.094 516.625 623.125 526.047 627.594 537.625 632.156 552.641 636.797 565.313 639.797 581.359 642.547 594.625 644.031 611.203 644.938 Z"/>
</defs>
<use id="Oben-2" stroke="#009485" stroke-opacity="1" stroke-linecap="round" fill="none" stroke-width="30" xlink:href="#stroke-path-2"/>
</g>
</svg>
docs/content/assets/img/favicon.ico

14.7 KB | W: | H:

docs/content/assets/img/favicon.ico

15 KB | W: | H:

docs/content/assets/img/favicon.ico
docs/content/assets/img/favicon.ico
docs/content/assets/img/favicon.ico
docs/content/assets/img/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="UTF-8"?>
<svg width="3598px" height="1087px" viewBox="43 41 3598 1087" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<!-- Generated by Pixelmator Pro 2.0.5 -->
<g id="Logo-mit-Text">
<g id="Logo">
<defs>
<path id="Unten" d="M706.689 560.317 C655.258 533.651 572.074 533.172 520.894 559.248 L118.253 764.392 C67.073 790.468 67.275 833.225 118.706 859.891 L523.311 1069.677 C574.742 1096.343 657.926 1096.822 709.106 1070.745 L1111.747 865.602 C1162.927 839.526 1162.725 796.769 1111.294 770.103 Z"/>
</defs>
<use id="Unten-1" xlink:href="#Unten" fill="#01695f" fill-opacity="1" stroke="none"/>
<defs>
<path id="stroke-path" d="M627.828 1104.828 L641.234 1103.984 660.719 1101.531 679.672 1097.531 697.656 1092 711.734 1086.188 1118.938 878.781 1132.047 871.094 1138.875 866.094 1146.469 859.313 1151.641 853.563 1157.063 845.891 1160.469 839.313 1163.516 830.641 1164.953 821.469 1164.688 812.234 1162.75 803.156 1159.219 794.453 1154.344 786.375 1149.609 780.375 1142.594 773.297 1136.297 768.094 1127.203 761.875 1118.422 756.922 713.359 546.891 703.938 542.422 692.422 537.891 680.359 534.047 667.875 530.906 655.063 528.438 642.016 526.656 628.734 525.5 612.156 525 598.781 525.328 585.547 526.328 572.5 527.969 559.703 530.281 547.234 533.297 535.203 537 523.719 541.391 514.328 545.766 111.188 751.172 102.453 756.031 93.375 762.172 87.094 767.328 80.109 774.359 75.406 780.328 70.625 788.281 67.781 795.078 65.578 803.766 64.953 811.031 65.625 820.047 67.969 829.063 71.875 837.672 77.094 845.609 82.047 851.484 89.359 858.438 95.813 863.484 102.859 868.172 111.563 873.094 516.625 1083.125 526.047 1087.594 537.625 1092.156 552.656 1096.797 565.313 1099.781 581.375 1102.547 594.641 1104.016 611.203 1104.922 Z"/>
</defs>
<use id="Unten-2" stroke="#ffffff" stroke-opacity="1" stroke-linecap="round" fill="none" stroke-width="30" xlink:href="#stroke-path"/>
<defs>
<path id="Mitte" d="M706.689 330.317 C655.258 303.651 572.074 303.172 520.894 329.248 L118.253 534.392 C67.073 560.468 67.275 603.225 118.706 629.891 L523.311 839.677 C574.742 866.343 657.926 866.822 709.106 840.745 L1111.747 635.602 C1162.927 609.526 1162.725 566.769 1111.294 540.103 Z"/>
</defs>
<use id="Mitte-1" xlink:href="#Mitte" fill="#01695f" fill-opacity="0.599" stroke="none"/>
<defs>
<path id="stroke-path-1" d="M627.828 874.828 L641.234 873.984 660.719 871.531 679.672 867.531 697.656 862 711.734 856.188 1118.938 648.781 1132.047 641.094 1138.875 636.094 1146.469 629.313 1151.641 623.563 1157.063 615.891 1160.469 609.313 1163.516 600.641 1164.953 591.469 1164.688 582.234 1162.75 573.156 1159.219 564.453 1154.344 556.375 1149.609 550.375 1142.594 543.297 1136.297 538.094 1127.203 531.875 1118.422 526.922 713.359 316.891 703.938 312.422 692.422 307.891 680.359 304.047 667.875 300.906 655.063 298.438 642.016 296.656 628.734 295.5 612.156 295 598.781 295.328 585.547 296.328 572.5 297.969 559.703 300.281 547.234 303.297 535.203 307 523.719 311.391 514.328 315.766 111.188 521.172 102.453 526.031 93.375 532.172 87.094 537.328 80.109 544.359 75.406 550.328 70.625 558.281 67.781 565.078 65.578 573.766 64.953 581.031 65.625 590.047 67.969 599.063 71.875 607.672 77.094 615.609 82.047 621.484 89.359 628.438 95.813 633.484 102.859 638.172 111.563 643.094 516.625 853.125 526.047 857.594 537.625 862.156 552.656 866.797 565.313 869.781 581.375 872.547 594.641 874.016 611.203 874.922 Z"/>
</defs>
<use id="Mitte-2" stroke="#ffffff" stroke-opacity="1" stroke-linecap="round" fill="none" stroke-width="30" xlink:href="#stroke-path-1"/>
<defs>
<path id="Oben" d="M706.689 100.323 C655.258 73.657 572.074 73.178 520.894 99.255 L118.253 304.398 C67.073 330.474 67.275 373.231 118.706 399.897 L523.311 609.683 C574.742 636.349 657.926 636.828 709.106 610.752 L1111.747 405.608 C1162.927 379.532 1162.725 336.775 1111.294 310.109 Z"/>
</defs>
<use id="Oben-1" xlink:href="#Oben" fill="#01695f" fill-opacity="0.396" stroke="none"/>
<defs>
<path id="stroke-path-2" d="M627.828 644.828 L641.234 643.984 660.719 641.531 679.672 637.547 697.672 632.016 711.734 626.172 1118.938 418.781 1132.047 411.094 1138.875 406.094 1146.453 399.313 1151.625 393.578 1157.063 385.891 1160.469 379.328 1163.516 370.641 1164.953 361.469 1164.688 352.234 1162.75 343.156 1159.219 334.453 1154.344 326.391 1149.609 320.391 1142.594 313.297 1136.297 308.094 1127.203 301.875 1118.422 296.922 713.359 86.891 703.938 82.422 692.406 77.891 680.359 74.063 667.875 70.906 655.063 68.453 642.016 66.656 628.734 65.5 612.141 65.016 598.781 65.344 585.547 66.344 572.5 67.984 559.703 70.297 547.234 73.313 535.203 77 523.703 81.406 514.313 85.781 111.188 291.172 102.453 296.031 93.375 302.172 87.094 307.328 80.094 314.359 75.406 320.359 70.641 328.281 67.781 335.063 65.578 343.766 64.953 351.031 65.625 360.078 67.969 369.078 71.875 377.672 77.094 385.625 82.047 391.484 89.375 398.453 95.828 403.484 102.859 408.172 111.563 413.094 516.625 623.125 526.047 627.594 537.625 632.156 552.641 636.797 565.313 639.797 581.359 642.547 594.625 644.031 611.203 644.938 Z"/>
</defs>
<use id="Oben-2" stroke="#ffffff" stroke-opacity="1" stroke-linecap="round" fill="none" stroke-width="30" xlink:href="#stroke-path-2"/>
</g>
<path id="Text" d="M3573.48 834.24 C3528.76 834.24 3495.077 821.34 3472.43 795.54 3449.783 769.74 3438.46 731.9 3438.46 682.02 L3438.46 258.04 C3438.46 228.8 3452.793 214.18 3481.46 214.18 3510.7 214.18 3525.32 228.8 3525.32 258.04 L3525.32 676.86 C3525.32 733.62 3548.253 762 3594.12 762 3599.28 762 3603.867 761.713 3607.88 761.14 3611.894 760.567 3615.907 760.28 3619.92 760.28 3626.8 759.707 3631.673 761.57 3634.54 765.87 3637.407 770.17 3638.84 778.913 3638.84 792.1 3638.84 815.607 3627.947 829.08 3606.16 832.52 3600.427 833.093 3594.837 833.523 3589.39 833.81 3583.943 834.097 3578.64 834.24 3573.48 834.24 Z M3107.36 987.32 C3091.307 987.32 3080.27 981.443 3074.25 969.69 3068.23 957.937 3068.66 944.32 3075.54 928.84 L3126.28 815.32 2973.2 460.14 C2966.32 444.66 2966.177 430.9 2972.77 418.86 2979.363 406.82 2992.406 400.8 3011.9 400.8 3022.22 400.8 3030.677 403.38 3037.27 408.54 3043.863 413.7 3049.74 422.587 3054.9 435.2 L3172.72 725.88 3292.26 435.2 C3297.42 422.013 3303.44 412.983 3310.32 408.11 3317.2 403.237 3326.66 400.8 3338.7 400.8 3354.18 400.8 3364.787 406.82 3370.52 418.86 3376.253 430.9 3375.967 444.373 3369.66 459.28 L3154.66 953.78 C3148.927 966.967 3142.477 975.853 3135.31 980.44 3128.143 985.027 3118.827 987.32 3107.36 987.32 Z M2765.08 834.24 C2739.853 834.24 2713.767 831.373 2686.82 825.64 2659.873 819.907 2635.507 810.16 2613.72 796.4 2603.973 790.667 2597.953 783.5 2595.66 774.9 2593.367 766.3 2593.94 758.273 2597.38 750.82 2600.82 743.367 2606.41 738.063 2614.15 734.91 2621.89 731.757 2630.633 732.76 2640.38 737.92 2662.74 749.96 2684.24 758.56 2704.88 763.72 2725.52 768.88 2745.873 771.46 2765.94 771.46 2796.327 771.46 2819.26 766.013 2834.74 755.12 2850.22 744.227 2857.96 729.607 2857.96 711.26 2857.96 696.353 2852.8 684.743 2842.48 676.43 2832.16 668.117 2816.68 661.667 2796.04 657.08 L2714.34 640.74 C2642.1 625.833 2605.98 588.567 2605.98 528.94 2605.98 489.38 2621.747 457.847 2653.28 434.34 2684.813 410.833 2726.093 399.08 2777.12 399.08 2828.72 399.08 2873.153 411.693 2910.42 436.92 2919.593 442.653 2925.04 449.677 2926.76 457.99 2928.48 466.303 2927.333 474.043 2923.32 481.21 2919.307 488.377 2913.43 493.393 2905.69 496.26 2897.95 499.127 2888.92 497.98 2878.6 492.82 2861.4 482.5 2844.2 474.903 2827 470.03 2809.8 465.157 2793.173 462.72 2777.12 462.72 2747.306 462.72 2724.66 468.31 2709.18 479.49 2693.7 490.67 2685.96 505.72 2685.96 524.64 2685.96 553.307 2704.88 571.653 2742.72 579.68 L2824.42 596.02 C2861.687 603.473 2889.923 616.087 2909.13 633.86 2928.337 651.633 2937.94 675.713 2937.94 706.1 2937.94 746.234 2922.174 777.623 2890.64 800.27 2859.106 822.917 2817.254 834.24 2765.08 834.24 Z M2307.56 834.24 C2278.32 834.24 2252.233 828.507 2229.3 817.04 2206.366 805.573 2188.163 790.093 2174.69 770.6 2161.217 751.107 2154.48 729.033 2154.48 704.38 2154.48 673.42 2162.363 649.053 2178.13 631.28 2193.897 613.507 2219.983 600.607 2256.39 592.58 2292.797 584.553 2341.96 580.54 2403.88 580.54 L2433.12 580.54 2433.12 558.18 C2433.12 525.5 2426.24 501.993 2412.48 487.66 2398.72 473.327 2376.073 466.16 2344.54 466.16 2326.193 466.16 2307.13 468.453 2287.35 473.04 2267.57 477.627 2247.073 485.367 2225.86 496.26 2213.82 501.993 2203.93 502.853 2196.19 498.84 2188.45 494.827 2183.147 488.52 2180.28 479.92 2177.413 471.32 2177.7 462.433 2181.14 453.26 2184.58 444.087 2191.747 437.207 2202.64 432.62 2227.867 421.153 2252.807 412.697 2277.46 407.25 2302.114 401.803 2325.333 399.08 2347.12 399.08 2404.454 399.08 2446.88 412.697 2474.4 439.93 2501.92 467.163 2515.68 509.733 2515.68 567.64 L2515.68 788.66 C2515.68 817.9 2502.207 832.52 2475.26 832.52 2447.74 832.52 2433.98 817.9 2433.98 788.66 L2433.98 756.84 C2423.66 780.92 2407.607 799.84 2385.82 813.6 2364.033 827.36 2337.947 834.24 2307.56 834.24 Z M2324.76 772.32 C2355.72 772.32 2381.52 761.427 2402.16 739.64 2422.8 717.853 2433.12 690.333 2433.12 657.08 L2433.12 633.86 2404.74 633.86 C2362.886 633.86 2330.063 635.867 2306.27 639.88 2282.477 643.893 2265.563 650.63 2255.53 660.09 2245.497 669.55 2240.48 682.593 2240.48 699.22 2240.48 721.007 2247.933 738.637 2262.84 752.11 2277.747 765.583 2298.386 772.32 2324.76 772.32 Z M1917.98 832.52 C1888.74 832.52 1874.12 817.9 1874.12 788.66 L1874.12 444.66 C1874.12 415.42 1888.167 400.8 1916.26 400.8 1944.354 400.8 1958.4 415.42 1958.4 444.66 L1958.4 481.64 C1969.867 455.84 1987.21 436.06 2010.43 422.3 2033.65 408.54 2061.886 400.513 2095.14 398.22 2116.354 396.5 2127.82 407.967 2129.54 432.62 2131.833 457.847 2119.507 471.607 2092.56 473.9 L2076.22 475.62 C1999.966 483.073 1961.84 522.346 1961.84 593.44 L1961.84 788.66 C1961.84 817.9 1947.22 832.52 1917.98 832.52 Z M1543.02 834.24 C1506.327 834.24 1474.077 825.497 1446.27 808.01 1418.463 790.523 1396.82 765.44 1381.34 732.76 1365.86 700.08 1358.12 661.38 1358.12 616.66 1358.12 571.94 1365.86 533.383 1381.34 500.99 1396.82 468.596 1418.32 443.513 1445.84 425.74 1473.36 407.967 1505.753 399.08 1543.02 399.08 1574.553 399.08 1602.646 405.96 1627.3 419.72 1651.953 433.48 1670.3 452.113 1682.34 475.62 L1682.34 258.04 C1682.34 228.8 1696.673 214.18 1725.34 214.18 1754.58 214.18 1769.2 228.8 1769.2 258.04 L1769.2 788.66 C1769.2 817.9 1754.867 832.52 1726.2 832.52 1697.533 832.52 1683.2 817.9 1683.2 788.66 L1683.2 755.98 C1670.587 780.06 1651.953 799.123 1627.3 813.17 1602.646 827.217 1574.553 834.24 1543.02 834.24 Z M1565.38 767.16 C1600.927 767.16 1629.593 754.26 1651.38 728.46 1673.167 702.66 1684.06 665.394 1684.06 616.66 1684.06 567.926 1673.167 530.803 1651.38 505.29 1629.593 479.777 1600.927 467.02 1565.38 467.02 1529.26 467.02 1500.307 479.777 1478.52 505.29 1456.733 530.803 1445.84 567.926 1445.84 616.66 1445.84 665.394 1456.733 702.66 1478.52 728.46 1500.307 754.26 1529.26 767.16 1565.38 767.16 Z" fill="#005e54" fill-opacity="1" stroke="none"/>
</g>
</svg>
......@@ -17,6 +17,20 @@
* along with drasyl. If not, see <http://www.gnu.org/licenses/>.
*/
/* latin */
@font-face {
font-family: 'Nunito';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url(Nunito-SemiBold.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
header .md-header-nav__topic.md-ellipsis:first-child{
font-family: 'Nunito', "Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;
}
/* Front page image size */
img[src$='#small'] {
width: 150px;
......
......@@ -6,10 +6,9 @@ We run some public super peers, so you don't have to.
| **Endpoint** | **Used drasyl version** |
|---------------|--------------------------|
| `udp://sp-ham1.drasyl.org:22527?publicKey=AhHUC25XyNoXgPazJunJcsuPYsUimE+0OuxCBJ77W1ZP&networkId=1` | Latest stable [release](https://github.com/drasyl-overlay/drasyl/releases) |
| `udp://sp-nue1.drasyl.org:22527?publicKey=AmHuiBcUG2JtNXOnZxWq0FPM7nQQ16ggwvyY+qTEhaWA&networkId=1` | Latest stable [release](https://github.com/drasyl-overlay/drasyl/releases) |
| `udp://staging.env.drasyl.org?publicKey=Awlq4wgKNpgppEhH1a8fZSvvP5kh6eG7rWSXC6vm08UC&networkId=-25421` | Latest [nightly](https://git.informatik.uni-hamburg.de/sane-public/drasyl/-/pipelines?page=1&scope=all&ref=master&status=success) |
| ```udp://sp-fra1.drasyl.org:22527?publicKey=AlEB2kO2tvvXuGPetk3QYKhskFaIlQg6jmsLlFlPBVoY&networkId=1``` | Latest stable [release](https://github.com/drasyl-overlay/drasyl/releases) |
| ```udp://sp-nue1.drasyl.org:22527?publicKey=AmHuiBcUG2JtNXOnZxWq0FPM7nQQ16ggwvyY+qTEhaWA&networkId=1``` | Latest stable [release](https://github.com/drasyl-overlay/drasyl/releases) |
By default, all drasyl nodes are configured to use the super peers `sp-ham1.drasyl.org`
By default, all drasyl nodes are configured to use the super peers `sp-fra1.drasyl.org`
and `sp-nue1.drasyl.org`.
......@@ -17,7 +17,7 @@ theme:
language: en
include_sidebar: true
favicon: assets/img/favicon.ico
logo: assets/img/drasyl.png
logo: assets/img/drasyl.svg
feature:
tabs: false
palette:
......
......@@ -25,9 +25,11 @@ import org.drasyl.cli.command.NodeCommand;
import org.drasyl.cli.command.PerfCommand;
import org.drasyl.cli.command.VersionCommand;
import org.drasyl.cli.command.WormholeCommand;
import org.drasyl.util.logging.Logger;
import org.drasyl.util.logging.LoggerFactory;
import java.io.PrintStream;
import java.util.Map;
import java.util.function.Consumer;
import static java.util.Objects.requireNonNull;
......@@ -37,7 +39,10 @@ import static java.util.Objects.requireNonNull;
*/
@SuppressWarnings("SameParameterValue")
public class Cli {
private static final Logger LOG = LoggerFactory.getLogger(Cli.class);
public static final Map<String, Command> COMMANDS;
public static final int EXIT_SUCCESS = 0;
public static final int EXIT_FAILURE = 1;
static {
COMMANDS = Map.of(
......@@ -50,18 +55,18 @@ public class Cli {
);
}
private final PrintStream err;
private final Map<String, Command> myCommands;
private final Consumer<Integer> exitSupplier;
public Cli() {
this(System.err, COMMANDS); // NOSONAR
this(COMMANDS, System::exit); // NOSONAR
}
@SuppressWarnings("SameParameterValue")
Cli(final PrintStream err,
final Map<String, Command> myCommands) {
this.err = requireNonNull(err);
Cli(final Map<String, Command> myCommands,
final Consumer<Integer> exitSupplier) {
this.myCommands = requireNonNull(myCommands);
this.exitSupplier = requireNonNull(exitSupplier);
}
public static void main(final String[] args) {
......@@ -78,12 +83,19 @@ public class Cli {
args = new String[0];
}
final Command command = myCommands.get(commandName);
if (command != null) {
command.execute(args);
try {
final Command command = myCommands.get(commandName);
if (command != null) {
command.execute(args);
exitSupplier.accept(EXIT_SUCCESS);
}
else {
throw new CliException("Unknown command \"" + commandName + "\" for \"drasyl\".");
}
}
else {
err.println("ERR: Unknown command \"" + commandName + "\" for \"drasyl\".");
catch (final CliException e) {
LOG.error(e);
exitSupplier.accept(EXIT_FAILURE);
}
}
}
......@@ -28,8 +28,10 @@ import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.drasyl.DrasylConfig;
import org.drasyl.DrasylNode;
import org.drasyl.cli.CliException;
import org.drasyl.util.logging.Logger;
import org.drasyl.util.logging.LoggerFactory;
import org.drasyl.util.logging.Slf4JLogger;
import java.io.File;
import java.io.PrintStream;
......@@ -77,8 +79,7 @@ abstract class AbstractCommand implements Command {
}
}
catch (final ParseException e) {
err.println("ERR: Unable to parse args.");
e.printStackTrace(err);
throw new CliException(e);
}
}
......@@ -156,10 +157,12 @@ abstract class AbstractCommand implements Command {
protected void setLogLevel(final CommandLine cmd) {
if (cmd.hasOption(OPT_VERBOSE)) {
final String levelString = cmd.getOptionValue(OPT_VERBOSE);
final Level level = Level.valueOf(levelString);
final ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger("org.drasyl").delegate();
root.setLevel(level);
final Logger logger = LoggerFactory.getLogger("org.drasyl");
if (logger instanceof Slf4JLogger && ((Slf4JLogger) logger).delegate() instanceof ch.qos.logback.classic.Logger) {
final Level level = Level.valueOf(levelString);
((ch.qos.logback.classic.Logger) ((Slf4JLogger) logger).delegate()).setLevel(level);
}
}
}
......
......@@ -34,7 +34,6 @@ import org.drasyl.util.logging.LoggerFactory;
import java.io.PrintStream;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.function.Consumer;
import java.util.function.Function;
import static java.util.Objects.requireNonNull;
......@@ -47,7 +46,6 @@ import static java.util.concurrent.CompletableFuture.failedFuture;
public class NodeCommand extends AbstractCommand {
private static final Logger LOG = LoggerFactory.getLogger(NodeCommand.class);
private final Function<DrasylConfig, Pair<DrasylNode, CompletableFuture<Void>>> nodeSupplier;
private final Consumer<Integer> exitSupplier;
private DrasylNode node;
public NodeCommand() {
......@@ -76,7 +74,6 @@ public class NodeCommand extends AbstractCommand {
return Pair.of(null, failedFuture(e));
}
},
System::exit,
null
);
}
......@@ -84,11 +81,9 @@ public class NodeCommand extends AbstractCommand {
NodeCommand(final PrintStream out,
final PrintStream err,
final Function<DrasylConfig, Pair<DrasylNode, CompletableFuture<Void>>> nodeSupplier,
final Consumer<Integer> exitSupplier,
final DrasylNode node) {
super(out, err);
this.nodeSupplier = requireNonNull(nodeSupplier);
this.exitSupplier = requireNonNull(exitSupplier);
this.node = node;
}
......@@ -105,7 +100,7 @@ public class NodeCommand extends AbstractCommand {
public void execute(final CommandLine cmd) {
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
if (node != null) {
LOG.info("Shutdown drasyl Node");
LOG.info("Shutdown drasyl node.");
node.shutdown().join();
}
}));
......@@ -128,8 +123,6 @@ public class NodeCommand extends AbstractCommand {
if (node != null) {
node.shutdown().join();
}
exitSupplier.accept(0);
}
}
......
......@@ -24,16 +24,18 @@ import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.drasyl.DrasylConfig;
import org.drasyl.DrasylException;
import org.drasyl.DrasylNode;
import org.drasyl.cli.CliException;
import org.drasyl.cli.command.perf.PerfClientNode;
import org.drasyl.cli.command.perf.PerfServerNode;
import org.drasyl.identity.CompressedPublicKey;
import org.drasyl.util.ThrowingBiFunction;
import org.drasyl.util.logging.Logger;
import org.drasyl.util.logging.LoggerFactory;
import java.io.PrintStream;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.function.Consumer;
import static java.util.Objects.requireNonNull;
......@@ -42,32 +44,34 @@ import static java.util.Objects.requireNonNull;
*/
@SuppressWarnings("java:S1192")
public class PerfCommand extends AbstractCommand {
private static final Logger LOG = LoggerFactory.getLogger(PerfCommand.class);
private static final int DEFAULT_MPS = 100;
private static final int DEFAULT_TIME = 10;
private static final int DEFAULT_SIZE = 850;
private final ThrowingBiFunction<DrasylConfig, PrintStream, PerfServerNode, DrasylException> serverNodeSupplier;
private final ThrowingBiFunction<DrasylConfig, PrintStream, PerfClientNode, DrasylException> clientNodeSupplier;
private final Consumer<Integer> exitSupplier;
public PerfCommand() {
this(
System.out, // NOSONAR
System.err, // NOSONAR
PerfServerNode::new,
PerfClientNode::new,
System::exit
);
}
private DrasylNode node;
PerfCommand(final PrintStream out,
final PrintStream err,
final ThrowingBiFunction<DrasylConfig, PrintStream, PerfServerNode, DrasylException> serverNodeSupplier,
final ThrowingBiFunction<DrasylConfig, PrintStream, PerfClientNode, DrasylException> clientNodeSupplier,
Consumer<Integer> exitSupplier) {
final ThrowingBiFunction<DrasylConfig, PrintStream, PerfClientNode, DrasylException> clientNodeSupplier) {
super(out, err);
this.serverNodeSupplier = requireNonNull(serverNodeSupplier);
this.clientNodeSupplier = requireNonNull(clientNodeSupplier);
this.exitSupplier = requireNonNull(exitSupplier);
}
PerfCommand(final PrintStream out) {
this(
out,
System.err, // NOSONAR
PerfServerNode::new,
PerfClientNode::new
);
}
public PerfCommand() {
this(System.out); // NOSONAR
}
@Override
......@@ -123,17 +127,23 @@ public class PerfCommand extends AbstractCommand {
}
private void server(final CommandLine cmd) {
PerfServerNode node = null;
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
if (node != null) {
LOG.info("Shutdown perf server node.");
node.shutdown().join();
}
}));
try {
// prepare node
node = serverNodeSupplier.apply(getDrasylConfig(cmd), out);
node.start();
// wait for node to finish
node.doneFuture().get();
((PerfServerNode) node).doneFuture().get();
}
catch (final DrasylException e) {
throw new CliException("Unable to create/run perf server node", e);
throw new CliException("Unable to create/run perf server node.", e);
}
catch (final InterruptedException e) {
Thread.currentThread().interrupt();
......@@ -145,13 +155,10 @@ public class PerfCommand extends AbstractCommand {
if (node != null) {
node.shutdown().join();
}
exitSupplier.accept(0);
}
}
private void client(final CommandLine cmd) {
PerfClientNode node = null;
try {
// prepare node
node = clientNodeSupplier.apply(getDrasylConfig(cmd), out);
......@@ -192,10 +199,10 @@ public class PerfCommand extends AbstractCommand {
final boolean directConnection = cmd.hasOption("direct");
final boolean reverse = cmd.hasOption("reverse");
node.setTestOptions(server, time, messagesPerSecond, size, directConnection, reverse);
((PerfClientNode) node).setTestOptions(server, time, messagesPerSecond, size, directConnection, reverse);
// wait for node to finish
node.doneFuture().get();
((PerfClientNode) node).doneFuture().get();
}
catch (final IllegalArgumentException e) {
throw new CliException("Invalid server address supplied", e);
......@@ -204,7 +211,7 @@ public class PerfCommand extends AbstractCommand {
throw new CliException("Unable to create/run perf client", e);
}
catch (final ParseException e) {
throw new CliException("Unable parse options", e);
throw new CliException("Unable to parse options", e);
}
catch (final InterruptedException e) {
Thread.currentThread().interrupt();
......@@ -216,8 +223,6 @@ public class PerfCommand extends AbstractCommand {
if (node != null) {
node.shutdown().join();
}
exitSupplier.accept(0);