О перфекционизме

Работая над проектированием интерфейса библиотеки, заметил за собой одну важную особенность поведения, которая упорно мешала мне продвигаться и закончить дело. Прямо куча мыслей и идей, но не могу выбрать, на какой из них остановиться и реализовать. Особенность заключается в желании сделать все наилучшим образом, так, чтобы за придуманное не было стыдно.

Паралич перфекциониста — состояние, при котором человек не может приступить к работе из-за страха, что все равно не сумеет сделать ее идеально.

В такие моменты помогает обсуждение идей с кем-нибудь.

Нужно и важно понимать, что достижение наилучшего качества — процесс последовательный. Невозможно с первого раза сделать все идеально. Но если не сделать ничего, боясь сделать плохо, то улучшать будет нечего и мы так и останемся ни с чем.

Начинайте, учитесь, улучшайте и переделывайте.

First version of tau is released. Tau is a tool for web designers who want to build websites using modern technologies such as haml, scss, coffee script and others.

Billing Panel For Home Internet Provider

The goal is to provide clients from a local network access to the internet, limit download traffic and bandwith for each client.

screenshot of the billing panel showing how much traffic remaining

Technical Details

Server machine has 2 Ethernet connection: to local network and to the internet. I configured a VPN server using pptpd and configured NAT in Linux kernel firewall using iptables.

User logins and passwords are stored in a database in a MySQL server.

pptpd uses FreeRADIUS for authentication and freeradius-mysql with custom configuration to pull login and password from the database. I had to additionally configure radiusclient to support MS-CHAP so clients with Windows can connect.

ulog-acctd was configured to monitor IP packets and write an aggregated log file in needed format: timestamp source_ip destination_ip bytes.

A script is written to parse ulog’s log file and update traffic used by a user in the database. This script is lauched by cron every minute.

Additionally, the script checks if user’s limit is exceeded and kills particular session (ip addr show & kill cat /var/run/ppp4.pid).

In order to limit bandwidth I mark all the packets coming to VPN IP addresses and use tc to configure limits. This code is executed in an ip-up script.

Authors

  • Backend & Linux Administration: Dmitry Zhlobo
  • User Interface: Eugene Zhlobo

billing.tar.gz (modified on March 2021, docker-compose.yml is added to run it easy on modern computers, texts were translated to English, database.sql contains database migrations code).