Skip to content

Flag possible scammers for review: sign-in country, Tor/VPN, writing hints, plus a one-time check of old-site members - #17

Merged
WhatBoxLLC merged 1 commit into
mainfrom
claude/project-thread-b3iggq
Nov 29, 2026
Merged

WhatBoxLLC merged 1 commit into
mainfrom
claude/project-thread-b3iggq

Conversation

@WhatBoxLLC

Copy link
Copy Markdown
Owner

Requested by Jeff Oakes · project thread

What it does

Gives the moderation team hints about likely scammers and bots. Nothing is blocked or suspended automatically; an admin decides.

Signals (packages/core/src/network-risk.ts, plain functions with no database or platform code, so they can later run as their own metered moderation service):

  • Country mismatch: none of the countries a member signs in from matches the country on their profile. Signing in from home once (say, before a trip) is enough not to flag them.
  • Tor exit node.
  • VPN or hosting network (a list of known hosting/VPN ASNs plus an org-name check). On its own this is only a note on the member, since plenty of honest people use a VPN.
  • Writing hints in About me: "Am a…" with the "I" dropped, British spelling (only when the profile says US), and wording common in scam profiles ("God fearing", working-abroad stories, "dear" greetings, asks to move to WhatsApp or Telegram, and similar).
  • Scored together: a country mismatch or Tor goes to the queue on its own. Writing hints need a second hint (another writing hint, or a VPN) before they do.

Where it shows: Moderation has a new "Possible scammer" card with the reasons, a See profile button, and Looks fine / Suspend member. Looks fine keeps the same flags quiet until something new turns up. Members shows badges plus the first reason, and the member profile view lists every hint and the countries they sign in from.

When it checks: at email-code and Apple/Google sign-in, and when a member changes their location or About me. Signup sets the country after the first sign-in, so a new account is checked once the profile is filled in.

Privacy

  • IP lookups use a local database inside the API (apps/api/src/ipintel.ts). Member IPs are never sent to an outside service.
  • Only the derived country, a count, the last time and any VPN/hosting org name are stored on the member. The IP itself is never stored.
  • Sign-in history older than 180 days is dropped by the cleanup job. Members never see their own risk data.
  • The existing rate limiter still keeps raw IPs for up to 2 days (unchanged here).

Data sources (no account needed)

  • DB-IP "IP to Country Lite" and "IP to ASN Lite" (CC BY 4.0, credited in Owner Admin). The API downloads them at startup and refreshes them weekly.
  • The Tor Project's public exit list, refreshed every 6 hours.
  • GEOIP_COUNTRY_URL / GEOIP_ASN_URL can point to MaxMind GeoLite2 instead. That needs a free MaxMind account and licence key, and both .mmdb.gz and .tar.gz downloads work. GEOIP=off turns all of this off. If a download fails, sign-in carries on with fewer or no hints.

One-time check of existing members

The old AspNetDating databases keep each member's signup IP and a full login log (IPLogs). The SkaDate extractor also reads Oxwall's joinIp. There is a new risk-check mode in the "Import members" workflow, run with the same backups as load. It:

  • skips photos;
  • looks each IP up on the throwaway runner and puts only the countries in the bundle;
  • queues members whose countries or writing don't fit their profile here.

It changes nothing else: no profile text, no status. The sign-in countries are used for the check and not stored. It is safe to re-run, because an open item or a "Looks fine" decision is respected.

Local trial on the Nov 28 backups (the June 2026 copy of DB-IP; the real run downloads the current one):

Site Members Would be queued Country mismatch
AfterH (old site only) 214 8 6
HFriends 3,291 598 497
DateALittle 1,647 195 183

Every member had at least one logged IP. The SkaDate members weren't in this trial because the SkaDate dump is only in Azure.

How to roll out

  1. Merge, then deploy prod. No migration is needed because the new fields live in the member document.
  2. Run Import members → mode risk-check once per site, with the same backup names as the load runs.

Tests

  • npm test -w @whatbox/core: 55 pass, including 6 new ones (mismatch, travel, Tor, VPN-only, history cap and pruning, writing hints and scoring).
  • npm test -w @whatbox/api: 12 pass, including database unpacking (.mmdb, .gz, MaxMind .tar.gz) and lookups.
  • npm run typecheck: clean across all workspaces.
  • The cleanup SQL was checked against Postgres 16.
  • The extractor was run end to end against all three restored backups.

Screenshots (from the preview, which now includes one demo flagged member): screenshots/scam-review-queue.png and screenshots/scam-review-profile.png in project files.


Generated by Claude Code

…GeoIP, no IPs kept), Tor/VPN, writing hints; one-time risk-check over old-site members

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015x8UvPor5y4oThmpSRWg2D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants