npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tera-proxy-sls

v0.2.0

Published

Adds servers to the EME TERA server list.

Downloads

2

Readme

tera-proxy-sls

Spawns an HTTP proxy server to modify a TERA server list.

Example:

const SlsProxy = require('sls');
const proxy = new SlsProxy({
  customServers: {
    4009: { name: 'Celestial Chills', port: 9999, overwrite: false },
  },
});
proxy.listen('127.0.0.1', () => console.log('listening'));
process.on('SIGHUP', () => proxy.close());

Server URLs:

Each region has its own server list. They are as follows:

API Reference:

new SlsProxy(opts)

Constructor with the following allowed options, all optional:

  • url: The URL of the target server list. Default: http://sls.service.enmasse.com:8080/servers/list.en
  • hostname: Overrides the hostname for the parsed url if given.
  • port: Overrides the port for the parsed url if given.
  • pathname: Overrides the pathname for the parsed url if given. Can be a string for a single path, or an array for multiple paths.
  • address: If not provided, a DNS lookup will be performed on the hostname. All requests will be proxied to the resolved address, or this one if given.
  • customServers: An object of custom servers. See setServers below for details.

The HTTP proxy server will run on the same port as specified here. Note that the target server list and the proxy server list must use the same port.

proxy.setServers(servers)

Sets the custom server object where servers is a mapping of server IDs with custom options.

For each server, valid options are:

  • ip: The IP to point to for the custom server. Default: 127.0.0.1
  • port: The port for the custom server. Default: null (no change)
  • name: The name to use for this server in the list. Default: null (no change)
  • keepOriginal: If true, this custom server will show up as an extra server instead of replacing the original one in the list. Default: false

If keepOriginal is true for a server, then the crowdness for the new server will have a sort value of 0 to give it priority over the old server when TERA selects which one to automatically log into.

proxy.fetch([index], callback)

Fetches a map of server IDs and simplified properties from the official list.

callback receives two parameters:

  • err: The error, or null if none.
  • servers: An object mapping IDs to objects containing server metadata.

Example result:

{
  "4004": {
    "id": "4004",
    "ip": "208.67.49.28",
    "port": "10001",
    "name": "Tempest Reach"
  },
  "4009": {
    "id": "4009",
    "ip": "208.67.49.68",
    "port": "10001",
    "name": "Celestial Hills - Roleplay"
  },
  "4012": {
    "id": "4012",
    "ip": "208.67.49.92",
    "port": "10001",
    "name": "Mount Tyrannas"
  }
}

proxy.listen(hostname, callback)

Starts an HTTP server listening on hostname, using callback as the handler for the listening event (see net.Server#listening). If there was an error, it will be passed as the first parameter to callback.

proxy.close()

Closes the proxy server.