Code Monkey home page Code Monkey logo

faucet-v2's Introduction

Hi! I'm a hobbyist programmer interested in cryptography, cryptocurrency, image manipulation, and cool stuff in general.

Most projects and other information at prussia.dev and prussia.dev/retro (now also on Tor!).

My favourite programming language at the moment is Typescript. Lately though, I've been getting into Scheme, which is incredibly fun to write though not I can't say I'm terribly productive in it... yet. I also know Python, Rust, HTML+CSS+JS, as well as a small, rapidly dwindling amount of Ruby and Solidity.

My current favourite projects are mingde (desktop environment thing in html canvas, live link) and hedgeblog (static blog with zero frontend JS, live link).

Want to hire me? I mainly do cryptocurrency-related work.

faucet-v2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

faucet-v2's Issues

IP ratelimit: X-Forwarded-For can be spoofed

Reported by @DevKingSaul

Solution, from MDN:

Trusted proxy count: The count of reverse proxies between the internet and the server is configured. The X-Forwarded-For IP list is searched from the rightmost by that count minus one. (For example, if there is only one reverse proxy, that proxy will add the client's IP address, so the rightmost address should be used. If there are three reverse proxies, the last two IP addresses will be internal.)

Fake url

When a coin is set to default, after user attempts (successfully or unsuccessfully), if they reload the page they will get 404. This is because default coins are at / but post requests are sent to, and respond to /<coin>. Solution: redirect when default.

Security

Implement scoring for all currencies? Also prussia captcha is insecure. Thats fine

Vite send fix

Can't use PoW twice in a snapshot block (75 seconds~) to send. Switch to staking instead of PoW.

Don't hardcode dry values

Unlikely, but if payouts are higher than the hardcoded dry values, and the balance is low, faucet send will likely fail. Shouldn't crash faucet though. Low priority bug, but eventually make dry based on the payouts.

[bug] MongoBug/Error?

Error, trying to run Nano-Faucet

Error (replit)

/home/runner/Faucet-v2/node_modules/mongodb/lib/sdam/topology.js:292
                const timeoutError = new error_1.MongoServerSelectionError(`Server selection timed out after ${serverSelectionTimeoutMS} ms`, this.description);
                                     ^

MongoServerSelectionError: connection <monitor> to 23.23.201.116:27017 closed
    at Timeout._onTimeout (/home/runner/Faucet-v2/node_modules/mongodb/lib/sdam/topology.js:292:38)
    at listOnTimeout (node:internal/timers:557:17) {
  reason: TopologyDescription {
    type: 'ReplicaSetNoPrimary',
    servers: Map(3) {
      'ac-a6lxmzw-shard-00-00.slzsv1i.mongodb.net:27017' => ServerDescription {
        address: 'ac-a6lxmzw-shard-00-00.slzsv1i.mongodb.net:27017',
        type: 'Unknown',
        hosts: [],
        passives: [],
        arbiters: [],
        tags: {},
        minWireVersion: 0,
        maxWireVersion: 0,
        roundTripTime: -1,
        lastUpdateTime: 14074569,
        lastWriteDate: 0,
        error: MongoNetworkError: connection <monitor> to 23.23.201.116:27017 closed
            at Connection.onClose (/home/runner/Faucet-v2/node_modules/mongodb/lib/cmap/connection.js:136:19)
            at TLSSocket.<anonymous> (/home/runner/Faucet-v2/node_modules/mongodb/lib/cmap/connection.js:63:46)
            at TLSSocket.emit (node:events:390:28)
            at TLSSocket.emit (node:domain:475:12)
            at node:net:687:12 {
          [Symbol(errorLabels)]: Set(1) { 'ResetPool' }
        },
        topologyVersion: null,
        setName: null,
        setVersion: null,
        electionId: null,
        logicalSessionTimeoutMinutes: null,
        primary: null,
        me: null,
        '$clusterTime': null
      },
      'ac-a6lxmzw-shard-00-01.slzsv1i.mongodb.net:27017' => ServerDescription {
        address: 'ac-a6lxmzw-shard-00-01.slzsv1i.mongodb.net:27017',
        type: 'Unknown',
        hosts: [],
        passives: [],
        arbiters: [],
        tags: {},
        minWireVersion: 0,
        maxWireVersion: 0,
        roundTripTime: -1,
        lastUpdateTime: 14073248,
        lastWriteDate: 0,
        error: MongoNetworkError: connection <monitor> to 35.175.54.237:27017 closed
            at Connection.onClose (/home/runner/Faucet-v2/node_modules/mongodb/lib/cmap/connection.js:136:19)
            at TLSSocket.<anonymous> (/home/runner/Faucet-v2/node_modules/mongodb/lib/cmap/connection.js:63:46)
            at TLSSocket.emit (node:events:390:28)
            at TLSSocket.emit (node:domain:475:12)
            at node:net:687:12 {
          [Symbol(errorLabels)]: Set(1) { 'ResetPool' }
        },
        topologyVersion: null,
        setName: null,
        setVersion: null,
        electionId: null,
        logicalSessionTimeoutMinutes: null,
        primary: null,
        me: null,
        '$clusterTime': null
      },
      'ac-a6lxmzw-shard-00-02.slzsv1i.mongodb.net:27017' => ServerDescription {
        address: 'ac-a6lxmzw-shard-00-02.slzsv1i.mongodb.net:27017',
        type: 'Unknown',
        hosts: [],
        passives: [],
        arbiters: [],
        tags: {},
        minWireVersion: 0,
        maxWireVersion: 0,
        roundTripTime: -1,
        lastUpdateTime: 14073920,
        lastWriteDate: 0,
        error: MongoNetworkError: connection <monitor> to 54.147.79.152:27017 closed
            at Connection.onClose (/home/runner/Faucet-v2/node_modules/mongodb/lib/cmap/connection.js:136:19)
            at TLSSocket.<anonymous> (/home/runner/Faucet-v2/node_modules/mongodb/lib/cmap/connection.js:63:46)
            at TLSSocket.emit (node:events:390:28)
            at TLSSocket.emit (node:domain:475:12)
            at node:net:687:12 {
          [Symbol(errorLabels)]: Set(1) { 'ResetPool' }
        },
        topologyVersion: null,
        setName: null,
        setVersion: null,
        electionId: null,
        logicalSessionTimeoutMinutes: null,
        primary: null,
        me: null,
        '$clusterTime': null
      }
    },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: 'atlas-wtnme1-shard-0',
    maxElectionId: null,
    maxSetVersion: null,
    commonWireVersion: 0,
    logicalSessionTimeoutMinutes: null
  },
  code: undefined,
  [Symbol(errorLabels)]: Set(0) {}
}

Config

{
  "self": "https://faucet-v2.imintheicu.repl.co",
  "name": "Prussia's <coin> Faucet",
  "db": "mongodb",
  "port": 8080,
  "owner": "YOUR NAME",
  "logo": false,
  "unopened_reduced_payouts": false,
  "notice": {
    "title": "More front-end potassium",
    "content": "All the faucets have a new look, go check them out!",
    "link": "https://banano.cc"
  },
  "sponsor": {
    "name": "Prussia",
    "link": "https://prussia.dev"
  },
  "captcha": {
    "hcaptcha_sitekey": "b4db4920-1a73-4b9b-995b-...",
    "use_splash": true,
    "prussia_captcha": "https://captcha.prussia.dev"
  },
  "banano": {
    "claim_frequency": 86400000,
    "enabled": false,
    "default": false,
    "auto_receive": false,
    "address": "",
    "rpc": "",
    "payouts": {
      "min_payout": 0.02,
      "max_payout": 0.07,
      "percentage": false
    }
  },
  "nano": {
    "claim_frequency": 86400000,
    "enabled": true,
    "default": true,
    "address": "nano_3p76j3jecwfdq5c9c99pyythx1shimxfz4ec5xeqbkebkgw3nie5jbh4z4kk",
    "rpc": "https://proxy.nanos.cc/proxy",
    "payouts": {
      "min_payout": 0.0001,
      "max_payout": 0.0002,
      "percentage": false
    }
  },
  "xdai": {
    "claim_frequency": 86400000,
    "enabled": false,
    "address": "",
    "rpc": "",
    "payouts": {
      "min_payout": 0.005,
      "max_payout": 0.005,
      "percentage": false
    }
  },
  "vite": {
    "claim_frequency": 86400000,
    "enabled": false,
    "address": "",
    "rpc": "",
    "payouts": {
      "min_payout": 0.01,
      "max_payout": 0.05,
      "percentage": false
    },
    "token": {
      "id": "",
      "amount": 1,
      "decimals": 0,
      "alias": "Token name"
    },
    "optional": true
  },
  "secrets": {
    "use_env": true
  }
}

Vite token id displayed, not name

Current vite faucet success message is:

Success! 0 VITE and 1 tti_319be644dc8d2d6ad154e309 has been sent to vite_30c5920d509059d0fd89ddec03a9570fe7717a50f7f1abaab6. Please donate to vite_7048fd81027d15bf798f72ee081464800d4fe227dbaa3ac964 to keep the faucet running!

We want tti_319be644dc8d2d6ad154e309 to be an actual token name

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.