@becauseyes/veepn-api-wrapper@0.0.1
latest
API wrapper around the "VeePN" extension from the Firefox store (they use HTTP proxies)
This package works with Cloudflare Workers, Node.js, Deno, Bun



JSR Score
76%
Published
2 months ago (0.0.1)
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495import type { ProxyType } from "./utils/common_types.ts"; import type { Result } from "./utils/result.ts"; export type LocationsListRoot = Result<LocationsList, unknown>; export type ServerListRoot = Result<Server[]>; export interface Server { /** the username for connecting to this proxy */ username: string; /** the password for connecting to this proxy */ password: string; /** the region (e.g. `us-or`) */ region: string; /** the region name (e.g. `Oregon`) */ regionName: string; /** the region "description" (e.g. `USA, Oregon`) */ regionDescription: string; /** `0`? */ type: number; /** e.g. `https` */ protocol: string; /** port for connecting to this proxy */ port: number; /** huh? also always seems to be `0` */ rpz_port: number; /** all addresses for this server */ addresses: string[]; /** seems to always be an empty string? */ config: string; } export interface LocationsList { /** idk what this is */ categories: unknown[]; /** all countries */ countries: Country[]; /** all locations */ locations: Location[]; /** a bunch of */ items: Item[]; } export interface Country { /** id of the country (e.g. 1.86) */ id: string; /** phrases related to the country (e.g. Albania, Tirana, AL) */ phrases: string[]; /** the name of the country (e.g. Albania) */ name: string; /** the (iso 2?) code of the country (e.g. AL) */ code: string; } /** a location from /location/list */ export interface Location { /** the id of the location (e.g. 2.117) */ id: string; /** phrases related to the location's country (e.g. Tirana, Albania, AL) */ phrases: string[]; /** multi routing? idk, but it's empty on all of them I think */ via: string; /** also an empty string */ target: string; /** the region of the location (e.g. AL) */ region: string; /** the name of the location (e.g. Tirana) */ name: string; /** the code of the location's country (e.g. AL) */ countryCode: string; /** idk what this is, always 0? */ type: number; /** the type of this proxy */ proxyType: ProxyType; } export interface Item { /** always 1? */ type: number; /** related to the a country ID? idk */ id: string; /** an array of location items... why do I have to document all of this LOL */ items: LocationItem[]; } export interface LocationItem { /** always 2? */ type: number; /** * seems to be interlinked with a location ID? * (e.g. Item ID 1.86 -> 2.117, and 2.117 is Albania) */ id: string; /** idk what's in here, always seems to be empty. */ items: []; }