Added some tests and text in readme.
This commit is contained in:
@@ -10,6 +10,12 @@ This project represents a minimal blockchain without cryptocurrency, capable of
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## How it works?
|
||||||
|
Every node connects to its siblings and synchronizes the domain database.
|
||||||
|
This DB consists of cryptographically bound blocks, that contain encrypted domain names, contacts, and some info, if you wish.
|
||||||
|
There are 10 domain zones available to get domain in:
|
||||||
|
`.anon`, `.btn`, `.conf`, `.index`, `.merch`, `.mirror`, `.mob`, `.screen`, `.srv`, `.ygg`.
|
||||||
|
But, `.anon` and `.ygg` are bound to have IP-addresses from Yggdrasil Network only.
|
||||||
|
|
||||||
## Building and running
|
## Building and running
|
||||||
|
|
||||||
@@ -68,18 +74,18 @@ wget -O - https://deb.revertron.com/key.txt | sudo apt-key add -
|
|||||||
```
|
```
|
||||||
echo 'deb http://deb.revertron.com/ debian alfis' | sudo tee /etc/apt/sources.list.d/alfis.list
|
echo 'deb http://deb.revertron.com/ debian alfis' | sudo tee /etc/apt/sources.list.d/alfis.list
|
||||||
```
|
```
|
||||||
3. Update packages
|
3. Update packages and install ALFIS
|
||||||
```
|
```
|
||||||
sudo apt update
|
sudo apt update && sudo apt install alfis
|
||||||
```
|
```
|
||||||
4. Install ALFIS
|
4. Enable and start the service
|
||||||
```
|
```
|
||||||
sudo apt install alfis
|
systemctl enable --now alfis
|
||||||
```
|
```
|
||||||
After that configuration is in file `/etc/alfis.conf` and data is saved to `/var/lib/alfis`.
|
After that configuration is in file `/etc/alfis.conf` and data is saved to `/var/lib/alfis`.
|
||||||
If you have some DNS server bound to port 53, it will not properly start. Deal with it on your own.
|
If you have some DNS server bound to port 53, it will not properly start. Deal with it on your own.
|
||||||
|
|
||||||
### GUI version Windows/Linux/MacOS (if you want to create and change domains)
|
### GUI version Windows/Linux/macOS (if you want to create and change domains)
|
||||||
If you want to create and manage your own domains on blockchain, you will need a version with GUI.
|
If you want to create and manage your own domains on blockchain, you will need a version with GUI.
|
||||||
You can download it from [releases](https://github.com/Revertron/Alfis/releases) section, choose appropriate OS and architecture version.
|
You can download it from [releases](https://github.com/Revertron/Alfis/releases) section, choose appropriate OS and architecture version.
|
||||||
It needs to be without `nogui` suffix.
|
It needs to be without `nogui` suffix.
|
||||||
@@ -92,3 +98,4 @@ If you want it to load config from another file you can command it so: `alfis -c
|
|||||||
1. Stabilize blockchain functions (domain transfer, info & contacts in UI), bug hunting and fixing.
|
1. Stabilize blockchain functions (domain transfer, info & contacts in UI), bug hunting and fixing.
|
||||||
2. Change DNS server/proxy to own resource saving implementation (using trust-dns-proto for RR parsing).
|
2. Change DNS server/proxy to own resource saving implementation (using trust-dns-proto for RR parsing).
|
||||||
3. P2P traffic encryption (ECDH).
|
3. P2P traffic encryption (ECDH).
|
||||||
|
4. Web-GUI to manage you node from browser.
|
||||||
@@ -176,6 +176,9 @@ mod test {
|
|||||||
assert!(!check_domain("ab.c-", true));
|
assert!(!check_domain("ab.c-", true));
|
||||||
assert!(!check_domain(".ab.c", true));
|
assert!(!check_domain(".ab.c", true));
|
||||||
assert!(!check_domain("ab.c-", true));
|
assert!(!check_domain("ab.c-", true));
|
||||||
|
assert!(check_domain("a.com", true));
|
||||||
|
assert!(check_domain("ab.com", true));
|
||||||
|
assert!(check_domain("abc.com", true));
|
||||||
assert!(check_domain("777.com", true));
|
assert!(check_domain("777.com", true));
|
||||||
assert!(!check_domain("77.com", true));
|
assert!(!check_domain("77.com", true));
|
||||||
assert!(!check_domain("7.com", true));
|
assert!(!check_domain("7.com", true));
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ impl Network {
|
|||||||
// Starting peer connections to bootstrap nodes
|
// Starting peer connections to bootstrap nodes
|
||||||
peers.connect_peers(&peers_addrs, &poll.registry(), &mut unique_token, yggdrasil_only);
|
peers.connect_peers(&peers_addrs, &poll.registry(), &mut unique_token, yggdrasil_only);
|
||||||
bootstrap_timer = Instant::now();
|
bootstrap_timer = Instant::now();
|
||||||
|
last_events_time = Instant::now();
|
||||||
}
|
}
|
||||||
// Poll Mio for events, blocking until we get an event.
|
// Poll Mio for events, blocking until we get an event.
|
||||||
poll.poll(&mut events, POLL_TIMEOUT).expect("Error polling sockets");
|
poll.poll(&mut events, POLL_TIMEOUT).expect("Error polling sockets");
|
||||||
|
|||||||
Reference in New Issue
Block a user