Giter VIP home page Giter VIP logo

proffapt / metahub Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sheharyaar/ptokax

9.0 9.0 4.0 13.46 MB

A repository to document PtokaX DC setup at IIT Kharagpur

Shell 0.39% C++ 54.72% C 21.68% Assembly 5.12% CSS 0.24% TeX 7.72% Makefile 0.92% JetBrains MPS 6.94% Python 0.06% Lua 2.22%
dc dcpp hacktoberfest iit-kgp-dc iit-kgp-dcpp iit-kgp-metahub iit-kgp-ptokax iitkgp-dc iitkgp-dcpp iitkgp-metahub iitkgp-ptokax metahub metahub-dc metahub-dcpp metahub-ptokax ptokax sheharyaar sheharyaar-ptokax

metahub's Introduction

Hi there , I'm Arpit Bhardwaj aka proffapt

I am an undergraduate from IIT Kharagpur.

Interested (and hence Reads) about Computers, Quantum Mechanics and Astronomy.
I sometimes write on blog.proffapt.me.

⭕️ For Professional details - READ MY RESUME


metahub's People

Contributors

proffapt avatar rajivharlalka avatar sheharyaar avatar shikharish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metahub's Issues

improve Metahub logging

Due to many reports of issues in metahub, we should improve logging in order to debug connection issues.

LED display support

Why?

  • To remove the need of ipofpi.sh completely.
  • Getting two lan ports in the same subnet can be a tedious task sometimes (ok, mostly).

What

Instead of using that script, the IP and other logs will be displayed in an LED Panel. By this, the maintainer will just need to plug-in to power and connect LAN into the pi and they will be good to go.

How?

  • Connect the LED panel to Rpi - might require a separate connector.
  • Write the test code for displaying text on Display.
  • Redirect all the outputs displayed during the execution of python script to the LED Panel.

Implement apache webserver configuration in setup script

A webpage opens when someone enters the ip/url in the web browser instead of dc client. Integrate its setup into the current workflow.

  • Here's the page:
<!DOCTYPE html>
<html>

<head>

  <title>Oops!</title>

  <style>
    body {
        margin: 0;
        padding: 0;
        font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
        background-color: #f0f0f0;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 80vh;
    }

    .container {
        background-color: #fff;
        border-radius: 10px;
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
        padding: 20px;
        text-align: center;
    }

    h1 {
        font-size: 40px;
        margin-bottom: 10px;
    }

    p {
        font-size: 22px;
        color: #666;
    }

    a {
        text-decoration: none;
        color: #0070e0;
    }

    footer {
      margin-top: 7px;
      border-radius: 10px;
      box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
      padding: 20px;
      text-align: center;
      background-color: #333;
      color: #fff;
      width: 100%; /* Set the width of the footer to 100% */
      box-sizing: border-box; /* Include padding in the width calculation */
    }

    .copyright-link { /* Style the <a> tag in the footer */
        color: #fff;
        text-decoration: none;
    }

    .copyright-link:hover { /* Add hover style for <a> tag in the footer */
        text-decoration: underline;
    }

    /* Add a wrapper with display: flex to stack container and footer vertically */
    .wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
  </style>

</head>

<body>

  <div class="wrapper">
    <div class="container">

      <h1>Oops!</h1>

      <p>
        It looks like you have entered <u><b>dc.metakgp.org</b></u> in a web browser,<br>
        when it should have been entered into a DC client instead.
      </p>

      <p>
        For more information, read the <a href="https://bit.ly/dc-setup" target="_blank">DC Client Setup Guide</a>.
      </p>

      <p>
        Still facing some issue? Report it on the <a href="https://bit.ly/dc-issue" target="_blank">DC Issue Tracker Form</a>.<br>
        Join <b>#dc-discssions</b> on <a href="https://slack.metakgp.org">MetaKGP slack</a> for further discussions.
      </p>

    </div>

    <footer>
      &copy; <a class="copyright-link" href="https://metakgp.github.io/" target="_blank">MetaKGP</a> 2023
    </footer>
  </div>

</body>

</html>
  • Setup SSL cert for HTTPS - I have the detailed step captured in form of screenshots :/

Separate out metapi specific functionalities

Create a new repository / whatever for the following implementations:

  • The code which makes sure IP doesn't change whatever be the case when in same location and changes when the location of PI changes

Static IP and Power Cut

When there is a power cut and it restores back, the PI tries to get previous IP but isn't able to get it, since the main network is not up yet. So it changes the IP to new static IP and ends up getting another IP even if the previous one was available.

improve Metahub logging

Due to many reports of issues in metahub, we should improve logging in order to debug connection issues.

Cross compilation and better support

Making changes to Ptokax and then porting and compiling it to arm can prove to be a pain. Go supports cross compilation which can prove to be a relief. Reference : https://github.com/direct-connect/go-dcpp

If approved, the following tasks need to be done :

  • Test out the Go hub on pi.
  • Test all features needed by us
  • Contribute to the repo / maintain our own branch

Dockerise

Dockerise full architecture for smooth deployment

Automate MetaHub Setup

POA

  • To create a systemd script which does the following job:
    • The .py script - runs everytime on booting
      • Detects if the pi has access to internet on boot-up or not.
      • If yes -> do nothing. If no -> delete the lines for static ip configuration in dhcpcd.conf.
      • starts the setup script, which configures current ip as static and starts ptokax service if not already.
    • The .sh script - install dependencies and executes the .py script.
  • Configure aliases instead of abstract path.
  • New ptokax-setup.sh for new needs
    • Automate the argument requirements for the setup-script.
    • Fix the bug - if it's not handled already - BUG
    • Check for every task if they are handled before or not

Testing w/o LED

  • ptokax-alias
  • ptokax-config.sh
  • ptokax-stop.sh
  • ./ptokax-start.sh
  • ./ptokax-setup.sh
  • systemd
    • ptokax.service
    • ptokax-startup-service.sh
    • ptokax-network-check.py
      • Network Access Check
      • ptokax-setup.sh
  • Improve script outputs from in script commands based on test runs.
  • Check the -ne $pid part.. in ipofpi.sh & ptokax-setup.sh and one more.. if they work or not..
  • setsid if it is available or not

Why?

To make it plug and play job to setup DC++.

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.