Code By
Lucas Mouilleron

66 projects - An Open Source selection

TSColumbus

Python 92.5% - Shell 4% - Dockerfile 2.1% - CSS 1.3%
Last update : 28/03/2019 - 18:29
Project is private, can't show more.

webServer

Shell 100%
Last update : 20/03/2019 - 15:08
Personal web server installation docs.
Project is private, can't show more.

+ watchTower

Python 58.9% - JavaScript 15% - Java 12.8% - HTML 5.4% - CSS 4.1% - Dockerfile 3% - Shell 0.8%
Last update : 08/03/2019 - 18:53

Screenshot

A simple watchtower service.
Heartbeat monitoring + event agregator.

Hearbeat definitions

  • The server is in charge of monitoring services
  • When a service is considered dead, the server then alerts its owner
  • A service is a pulsing agent
  • A pulse is a sign of aliveness
  • When a service pulse the server, it tells him when he will pulse again in the worst case
  • If the service has not pulsed again in time, the server considers the service dead and alerts its owner
  • When a service is no longer required, it must inform the server to avoid a false dead alerts
  • An alert can be a mail, a pushover message, etc.

Event definitions

  • The server is in charge or recieving events
  • When a service sends an event, the server stores it
  • On demand, events can be retrieved for consultation
  • An event is: service + message + level + date of registration

Implementation

  • HTTP client / server architecture
  • All queries protected by password set in HTTP headers under "password"
  • Heartbeat protocol:
    • Pulse:
      • POST /
      • {"service":"SERVICE_NAME","alertType":"ALERT_TYPE","alertTarget":"TARGET_NAME","nextIn":EXPECTED_NEXT_HEARTBEAT_IN_SECS}
    • Cancel:
      • DELETE /
      • {"service":"SERVICE_NAME"}
    • List:
      • GET /
  • Event protocol:
    • Add:
      • POST /add-event
      • {"service":"SERVICE_NAME", "level":"level", "message":"the message"}
    • List:
      • GET /list-events
      • optional params: service (is), from (above), to (below), level (above), message (contains)

Server

  • ./server
  • python3
  • Dependencies: pip install -r requirements.txt
  • Config:
    • config/config.json: main config (cp config/sample.json config/config.json)
    • config/server.crt, config/server.key: SSL certificate, used only if SSL activated
  • Datas: data
  • Deploy:
    • Install dependencies
    • Setup config
    • Generate ssl certificates (optional)
    • Hook in with upstart (optional, ./server/config/sample.upstart.conf, http://upstart.ubuntu.com/getting-started.html)
  • Run: python server.py
  • Docker:
    • ./docker
    • Config: place server config files in ./docker/config
    • Interactive: cd docker && tools/dockerBuild && tools/dockerRun
    • Detached: cd docker && tools/dockerBuild && tools/dockerRunDetached

Server GUI

  • https://hostname.com:443/gui

Java Client

  • ./clientJava
  • Java 7+
  • No dependencies
  • Run test:

Python Client

  • ./clientPython
  • python3
  • Dependencies: requests (pip install requests)
  • Run test: python test.py

Javascript client

  • ./clientJavascript
  • client.js is a node module
  • Dependencies: packages.json -> devDependencies (npm install)
  • Run test: node test.js
  • Run test in browser: browserify test.js -o bundle.js and open test.html in browser

Certificates

  • Self signed: openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt
  • Letsencrypt: TODO

TODO

  • Put data writing in a queue
  • Put alert sending in a queue
  • (Way) better events persister

siteERAAM

PHP 53% - HTML 22% - JavaScript 13.9% - CSS 9.2% - Shell 1.9%
Last update : 28/02/2019 - 13:03
Project is private, can't show more.

TSMarcoPolo

Java 100%
Last update : 08/02/2019 - 15:37
Project is private, can't show more.

TSMarcoPoloRunManager

Java 100%
Last update : 07/02/2019 - 17:32
Project is private, can't show more.

mediaServer

Last update : 23/01/2019 - 10:33
Project is private, can't show more.

TSDashboard

HTML 71% - CSS 9.7% - JavaScript 9.3% - Python 6.8% - Shell 2.4% - PHP 0.8%
Last update : 16/01/2019 - 14:21
Content agnostic dashboard app.
Project is private, can't show more.

+ sshForFriends

Shell 100%
Last update : 14/12/2018 - 12:55

Temporally give ssh access to your friends.

sshForFriends uses friends public keys to give them access to the computer.
When sshForFriends has finished running, public keys are cleaned and friends can't access the computer anymore.
Public keys are fetched from known identity providers.

Tested on macOS and Ubuntu.

No password, no hastle, 100% SSH.

Screenshot

Usage

  • sshForFriends [OPTIONS] friendUsername
  • friendUsername is the friend username which will be granted access (identity provider username)
  • sshForFriends -h for more usage help

Identity providers

  • id_rsa: key from cat $HOME/.ssh/id_rsa.pub on your friend's machine (-r RSA_PUB_KEY)
  • Github : keys from https://github.com/$USER_NAME.keys (-g, -i github)
  • Keybase : keys from https://$USER_NAME.keybase.pub/id_rsa.pub (-k, -i keybase)

Behind a firewall

  • If the computer being accessed is behind a firewall, sshForFriends can use a public server for ssh forwading.
  • See params -x, -l, -m and -n
  • On the public server, make sure GatewayPorts yes is set in the /etc/ssh/sshd_config file
  • See examples below

Miscs

  • macOS, enable ssh server : sudo systemsetup -setremotelogin on

Examples

  • Give access from a machine to lucasmouilleron in one line : curl -sL https://raw.githubusercontent.com/lucasmouilleron/sshForFriends/master/sshForFriends -o $HOME/sshForFriends ; chmod a+x $HOME/sshForFriends ; $HOME/sshForFriends -g lucasmouilleron
  • Give access from a machine to lucasmouilleron in one line : curl -sL https://raw.githubusercontent.com/lucasmouilleron/sshForFriends/master/sshForFriends -o $HOME/sshForFriends ; chmod a+x $HOME/sshForFriends ; $HOME/sshForFriends -k lucasmouilleron
  • Give access from a machine behind a firewall to lucasmouilleron in one line : curl -sL https://raw.githubusercontent.com/lucasmouilleron/sshForFriends/master/sshForFriends -o $HOME/sshForFriends ; chmod a+x $HOME/sshForFriends ; $HOME/sshForFriends -g -x lucasmouilleron.com -l sshtunnel -m 10022 lucasmouilleron
  • Give access from a machine behind a firewall to a friend with pub key in one line : curl -sL https://raw.githubusercontent.com/lucasmouilleron/sshForFriends/master/sshForFriends -o $HOME/sshForFriends ; chmod a+x $HOME/sshForFriends ; $HOME/sshForFriends -r "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDqN4/IlNfY8I5AUYYnj9mieJ9Uyx4rMbZjxyukmwM1nqSpTmFBs5xdqtE1Qi1DDb6V0Nphua80GUxXfIiKmbJVuOnrBjX2qInwMPtFxJ0gr8adXYIamcCVylcCPm2qO418KQpuHNM1es5s0a2hzuuRCtw6trysq/SCSIp6o05OEdHP8CbfCdFA+P7sy99XHG3yGzqHdU0D04ScDePzm1buSOXqQRCrSkuLmRMBhtRQSj7UAI3IlRcF3tEFPqAywjwnZVIvv6fUoXnpJuoCzBPuJv5D5lo06xixwIvHc39t1r4Tv/OrD+EyWfPsmCpLGfEkMRBqmj/ds5c4y6NjO9cl" -x lucasmouilleron.com -l sshtunnel -m 10022 yourfriendname

Credits

  • Inspired by https://github.com/flplv/ssh-allow-friend

+ simpleWebFolder

PHP 92.4% - CSS 7.6%
Last update : 04/12/2018 - 09:04

A simple web folder.
For Apache web servers.

Screenshot

Features

  • List files and folders
  • Nice layout
  • Password protection:
    • drop a .password file containing the deisred password in folders (and subfolders) you want to protect
    • drop a .nopassword file in folders (and subfolders) you want to deprotect (in case of protected parent)
  • Download folder as a zip
  • Shares: expiration, path obfuscation, tracking
  • README.md files in folders are interpreted and displayed on top

Install

  • Requires PHP 5+, Apache 2.4+
  • cd _sf;composer install
  • Drop the _sf folder in the root folder
  • Drop the _sf_assets folder in the root folder
  • Create the _sf_shares folders for shares to be activated
  • Drop the .htaccess file in the root folder

Customisation

  • Don't edit files in /_sf
  • Create /_sf_overrides folder
    • Create config.php and override configs defined in _sf/config.php
    • Create style.css and override styles

TODO

  • Clean shares
  • Python ?