Socket
Book a DemoInstallSign in
Socket

@paradisec/proxyist-adapter-local

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paradisec/proxyist-adapter-local

Local filesystem adapter for proxyist

0.3.0
latest
npmnpm
Version published
Weekly downloads
36
620%
Maintainers
2
Weekly downloads
 
Created
Source

Local disk back end for Proxyist

Proxyist is a web proxy which provides an object store like interface to a catalog of items which contain objects.

This adapter provides support for a local disk based backend.

Installation

See the proxyist README.md for details on how to get proxist running. Then add this adapter.

yarn add proxyist-adapter-local

Configuration

Here is a sample proxyist configuration for this adapter:

import { BadIdentifierError } from '@paradisec/proxyist-adapter-common';

export default {
  directory: '/srv/proxyist/data',
  transform: (identifier) => {
    if (identifier.includes('/')) {
      throw new BadIdentifierError('Identifer cannot contain "/"');
    }

    if (identifier.includes('-')) {
      const [, item] = identifier.split('-', 2);
      if (item === 'root') {
        throw new BadIdentifierError('Item cannot be named "root"');
      }

      return identifier.replace(/-/, '/');
    }

    return `${identifier}/root`;
  },
};

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

ISC

FAQs

Package last updated on 22 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.