Coder Social home page Coder Social logo

imaubrey / lookingglass Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hybula/lookingglass

0.0 0.0 0.0 757 KB

Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 8.

Home Page: https://www.hybula.com

License: Mozilla Public License 2.0

PHP 99.33% Dockerfile 0.67%

lookingglass's Introduction

Looking Glass

Modern, simple and fresh looking glass based on Bootstrap 5 and PHP 8 (also compatible with 7). A looking glass is a network utility which is made user-friendly for everyone to use. It allows you to execute network related commands within a remote network, usually that of an ISP.

Demo

See it in action here!

Features

  • Bootstrap 5 UI.
  • Real time command output using JavaScript.
  • Supports ping/ping6, traceroute/traceroute6 and mtr/mtr6.
  • Easy to customize and to configure.
  • DNS checking to prevent unnecessary executions.

Requirements

  • Any Linux distribution, this has been tested on RHEL 8 + 9.
  • PHP 7.1 or higher, PHP 8 preferred.
  • IPv6 connectivity if you want to use the v6 equivalents.
  • Root access.

Installation

For this installation we will assume that we are working on AlmaLinux 8 or 9. Warning: This guide does not cover any security hardening or rate limiting. Note: These steps also work with AlmaLinux 9, but it will install PHP 8 instead of 7.

  1. Install the required network tools: dnf install mtr traceroute -y.
  2. Install the web server with PHP (by default it will install 7.2 on RHEL 8): dnf install httpd mod_ssl php php-posix -y.
  3. Enable and start Apache/PHP-FPM: systemctl enable httpd; systemctl enable php-fpm and systemctl start httpd; systemctl start php-fpm.
  4. Let's help MTR to work, execute the following command: ln -s /usr/sbin/mtr /usr/bin/mtr and also mtr helper called mtr-packet: ln -s /usr/sbin/mtr-packet /usr/bin/mtr-packet.
  5. You must configure SELinux before this all works, or you can disable SELinux using setenforce 0 and possibly make it permanent: nano /etc/selinux/config change to SELINUX=disabled.
  6. Upload the contents of the ZIP to /var/www/html/.
  7. Rename config.dist.php to config.php and adjust the settings.
  8. (Optional) You might want to enable SSL using LetsEncrypt, take a look at acme.sh.

Upgrading

Upgrading from a previous version is easy, simply overwrite your current installation with the new files. Then update your config.php accordingly, the script will automatically check for missing variables.

Customization

If you open up config.dist.php you will see that there are some features that allows you to customize the looking glass, this includes a custom CSS override. You may also extend the looking glass with a custom block.

TODO

  • Move to Composer;
  • Software-based rate limiting;
  • Implement a template engine, for advanced customization;
  • Switch to WebSockets.

Contribute

We would love to receive code contributions in the form of a pull request. We prefer this over forking, so if you have any code improvements feel free to commit.

Credits

This project is inspired by the LookingGlass project of @telephone and uses his procExecute() function, although slightly modified.

License

Mozilla Public License Version 2.0

lookingglass's People

Contributors

dqos avatar marchagen avatar kimma avatar amit177 avatar decicus avatar deliciousbob avatar jkjameson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.