Giter Club home page Giter Club logo

hadfield's Introduction

Welcome!

About me

My name is Julian Webb. I am a self-taught programmer looking to make stuff people want to use.

I’ve been developing on and off for decades, ever since I first got access to the internet in the 00s and learnt what a Neopet was. While most of my work is sadly lost to time, it’s definitely shaped how I think about technology today.

Most of my repositories here contain projects built using NodeJS and JavaScript, it really is a versatile tool. I do have experience with other languages however, such as Python, Ruby, Lua, PHP, FORTRAN, Basic, etc., it’s just so tempting to always fallback on JavaScript!

My latest project is xCBC, a bodge to fix CBC's link previews on discord that I’ve written in, you guessed it, JavaScript. It aims to be a useful tool until CBC fixes the problem themselves.

Blog

I have a blog, I post things sometimes. Some of it might be worth reading.

Website

Contact

If you want you can contact me using the following methods:

Email
Matrix
Twitter

hadfield's People

Contributors

julianwebb avatar

Stargazers

 avatar

Watchers

 avatar

hadfield's Issues

Refactor needed

Current codebase has two major issues:

  • Mix of processing on start up and when a client request comes in
  • Spaghetti code, the gopher class is barely doing anything.

Target not matching Selector causes Error

Problem

When a Directory Type Entry has a Target that doesn't match the Selector, the server crashes due to something being undefined.

hadfield_1  | User configuration loaded from: /app/data/configuration.toml
hadfield_1  | Server listening on gopher://0.0.0.0:70/
hadfield_1  | Incoming message:  
hadfield_1  | Incoming message:  /hole
hadfield_1  | /app/source/catalogue.js:79
hadfield_1  |                           const message = this.menuList[selection.target].sort((scooby, shaggy) => {
hadfield_1  |                                                                           ^
hadfield_1  | 
hadfield_1  | TypeError: Cannot read properties of undefined (reading 'sort')
hadfield_1  |     at Catalogue.query (/app/source/catalogue.js:79:53)
hadfield_1  |     at Gopher.serve (/app/source/gopher.js:54:30)
hadfield_1  |     at SocketManager.emit (node:events:390:28)
hadfield_1  |     at Socket.<anonymous> (/app/source/server.js:20:10)
hadfield_1  |     at Object.onceWrapper (node:events:510:26)
hadfield_1  |     at Socket.emit (node:events:390:28)
hadfield_1  |     at addChunk (node:internal/streams/readable:315:12)
hadfield_1  |     at readableAddChunk (node:internal/streams/readable:289:9)
hadfield_1  |     at Socket.Readable.push (node:internal/streams/readable:228:10)
hadfield_1  |     at TCP.onStreamRead (node:internal/stream_base_commons:199:23)

Cannot link to content on other servers

Problem

Host and Port information is currently being handled by the Menu class, additionally the Host and Port information is kept in a master configuration file meaning no other servers can be listed in a Menu

Hadfield crashed on nmap port scan

Problem

When an active Hadfield server gets a connection from an nmap port scan, the server fatally crashes with an unhandled error:

node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:220:20)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}

Nmap reports the port in use by Hadfield to be of service afs3-fileserver

Steps to Reproduce

  1. Start a Hadfield server instance
  2. Run nmap -p{PORT} localhost
  3. Crash

Seperate the configuration for bindHost and displayHost

Problem
Currently Hadfield takes in a single value server.host and uses it for both the server bindHost and the gopher displayHost. This causes issues when the application is being run behind a reverse proxy or in a container.

Solution
Create addition configuration option gopher.host, when this configuration option is set, use it instead of server.host as the gopher displayHost.

Add Server Information to caps.txt

caps.txt has the properties ServerSoftware and ServerSoftwareVersion, having Hadfield autopopulate them when the caps.txt functionality is enabled sounds like a good idea.

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.