Optional Tor support

This commit is contained in:
Cadence Fish
2020-02-03 00:43:56 +13:00
parent b944042fe0
commit 96fa4758c0
11 changed files with 597 additions and 125 deletions

View File

@@ -7,6 +7,8 @@
let constants = {
// Things that server owners _should_ change!
website_origin: "http://localhost:10407",
use_tor: false, // Whether to enable Tor support at all
tor_password: null, // No effect without `use_tor = true`. If `null`, node will run its own Tor process instead.
// Things that server owners _could_ change if they want to.
settings: {
@@ -25,6 +27,7 @@ let constants = {
external: {
user_query_hash: "c9100bf9110dd6361671f113dd02e7d6",
timeline_query_hash: "e769aa130647d2354c40ea6a439bfc08",
timeline_query_hash_2: "42323d64886122307be10013ad2dcc44", // https://github.com/rarcega/instagram-scraper/blob/dc022081dbefc81500c5f70cce5c70cfd2816e3c/instagram_scraper/constants.py#L30
shortcode_query_hash: "2b0673e0dc4580674a88d426fe00ea90",
timeline_fetch_first: 12,
username_regex: "[\\w.]+",
@@ -45,7 +48,8 @@ let constants = {
TYPE_GALLERY_VIDEO: Symbol("TYPE_GALLERY_VIDEO"),
NOT_FOUND: Symbol("NOT_FOUND"),
NO_SHARED_DATA: Symbol("NO_SHARED_DATA"),
INSTAGRAM_DEMANDS_LOGIN: Symbol("INSTAGRAM_DEMANDS_LOGIN")
INSTAGRAM_DEMANDS_LOGIN: Symbol("INSTAGRAM_DEMANDS_LOGIN"),
RATE_LIMITED: Symbol("RATE_LIMITED")
},
database_version: 1