Anping 中文

Migrating from Thinfinity

Your program keeps sending the same request (/ws/oturl/get) and gets the same answer. Only the server address changes; everything else is set up on the Anping server.

What stays the same

SameDetails
Path/ws/oturl/get, with the values in the address (GET).
OptionsEvery option's name, type and default (differences).
Answer/oturl.html?key=..&pass=.., which your program puts after the server address.
ModesName a model; a model plus your own options (overrideDefaults=true); or no model.

What changes

ItemWith Anping
Server addressThe Anping address, such as https://anping.example.com.
API keyOne of Oturl:ApiKeys: a new key, or the value you send today if only the address should change.
ModelsEach Access Profile your program names becomes a computer setup in Anping. Its Id is that same model value, and its settings go under Targets:N:Oturl:<parameter>.
computer in the requestYour program can only name computers listed in Oturl:AllowedComputers.
Showing it in your pageYour site's address in Oturl:FrameAncestors.
Public name checkYour public name in AllowedHosts.
Computer certificatesYour sign-in is checked first (NLA), and each computer must prove who it is with a trusted or pinned certificate. The one Windows makes for itself needs a pin (below).
Production checksAnping won't start with the development key, a key under 32 characters, test pages or a missing load balancer setting (settings).

A model, step by step

Say your program sends model=sales-desktop, a profile that opens one program window (RemoteApp) at a fixed size. On the Anping server you write:

Targets__0__Id=sales-desktop
Targets__0__Name=Sales
Targets__0__Host=sales-rdp.corp.example
Targets__0__Port=3389
Targets__0__Domain=CORP
Targets__0__Username=sales-app
Targets__0__Password=<from your secret store>
Targets__0__Oturl__startprg=2
Targets__0__Oturl__command=||SalesApp
Targets__0__Oturl__resolution=fixed
Targets__0__Oturl__width=1280
Targets__0__Oturl__height=800
Targets__0__Oturl__clipboard=false

Leave out Username and Password and the link page asks each user; or your program sends them. A setting with a wrong value shows up in the log when Anping starts.

Settings that are not parameters, and Thinfinity's names

Access Profile to model

In your Access ProfileWhere it goes in Anping (same names as the link options)
Profile key (model)Targets:N:Id, the same value, exact case.
NameTargets:N:Name, shown in the toolbar.
Computer, portTargets:N:Host, Targets:N:Port.
Saved user name and passwordTargets:N:Username, Password, Domain; left out, the link page asks.
Security, early sign-in check (NLA), certificateTargets:N:Security (default nla), Targets:N:CertFingerprints; Targets:N:Oturl:disablenla.
DisplayTargets:N:Oturl:resolution, width, height, bpp, imagequality.
ExperienceTargets:N:Oturl:desktopbackground, visualstyles, menuwindowanimation, fontsmoothing, showwindowcontent, desktopcomposition.
ProgramTargets:N:Oturl:startprg, command, cmdargs, directory.
MoreA model that starts a program keeps it, also with overrideDefaults=true; for Thinfinity's behaviour set Targets:N:AllowProgramOverride.
KeyboardTargets:N:Oturl:unicodekeyboard, keyboardlayout; the session's layout: Targets:N:KeyboardLayout.
Console session, compressionTargets:N:Oturl:console, wscompression.
Virtual machine (Hyper-V), server farm (RD Connection Broker)Targets:N:Oturl:desttype, destinfo.
Shared folder, clipboard, sound, printerTargets:N:Oturl:diskenabled, diskname, diskautodownload, clipboard, soundenabled, soundquality, printer*.
MoreTo limit one direction or forbid a feature: AllowUpload, AllowDownload, AllowCopy, AllowPaste, AllowAudio, AllowPrinting. Printing is off by default (Guacd:Printing, below).
Video compression (H.264), recording, pools, load balancing, permissionsNo equivalent: dropped in the move, without any error. Your program decides who gets a link.
MoreSession recording, pools or load balancing over several computers, and permissions (which users or groups may use the profile). Sessions simply run without them.

Anping ignores a name under Targets:N:Oturl that isn't a link option, and warns about it when it starts.

Parameter mapping

Every option keeps its name, in the request and in a model's Oturl settings. What each one does and how well it works: parameter table. Anping also accepts format=json and POST.

Known differences

TopicWhat is different in Anping
Colour depth32-bit colour by default (Thinfinity: 16). For 16, set Targets__N__Oturl__bpp=16.
Technical detailWithout bpp: 32-bit colour with the RDP graphics pipeline. Set the 16 on the model, or send bpp=16 with overrideDefaults=true: with model alone, connection parameters in the request are ignored.
modelMust match a model's Id exactly, upper and lower case included. Option names may use any case.
imagequality2 and 3 behave like 1.
directoryOnly for single program windows (RemoteApp, startprg=2).
unicodekeyboardTyped text is right as long as the remote session uses the model's keyboard layout.
diskname, diskautodownloadThe shared folder is called Anping by default. Saved files come to the browser once closed; not yet checked with Windows.
Technical detailFrom anywhere in the drive if the Anping server runs on Linux, otherwise only from the drive's Download folder. A file over Files:MaxUploadBytes stays on the drive.
printerenabledPrinting is off by default: the link opens without a printer, and the dry run says why. Turning it on (Guacd:Printing) needs a desktop engine with Ghostscript, which is AGPL-3 or a commercial license from Artifex.
printersetasdefault=false, printerdriverNot possible with the desktop engine (guacd from Apache Guacamole 1.6.0).
SoundPlays in any browser that can play sound from a page (Web Audio), after the first click or key press.
Reload, dropsSame browser: 10 minutes after a disconnect, automatically 60 seconds after a drop. Others: the used message.
ConnectionsOne connection per link; a newer one from the same browser takes over at once.
ErrorsA plain-text answer: an error number (HTTP status) and a short reason (errors).
Time zone, computer name, touchNo link options for these; set them per model (TimeZone, ClientName, Touch).
Technical detailBy default every session gets the browser's time zone (with a Windows policy, Windows computers), the client name Anping- and 8 characters of the link id, and touch as a mouse.
Session limits60 minutes without input, 720 after the start; End closes a link for good (lifetime).
MoreSessions:IdleTimeoutMinutes and Sessions:MaxDurationMinutes; 0 turns a limit off.
RestartForgets every link and ends every session; users need a new link.
MoreUsed or not. The page says the service restarted and that a new link is needed.
Model limitsA model's limits (Allow flags) and its program stay, even with overrideDefaults=true.
Technical detailThe Allow flags are ceilings a request can't raise; a model that starts a program keeps it unless AllowProgramOverride is set (Thinfinity lets the request change it).
Wrong passwordsLimited per link and per network (sign-in limits).
CertificatesYour sign-in is checked first (NLA), and the computer needs a trusted or pinned certificate (below).
Several Anping serversA link opens only on the Anping server that made it (deploying).
Not yet testedVirtual machines (Hyper-V), server farms (RD Connection Broker, RD Session Host), single program windows (RemoteApp) on a real server, and Windows other than Server 2025.
Technical detailHyper-V is desttype=VMID, the RD Connection Broker desttype=RDS. Also: keyboard layouts other than US English; time zone, client name and native touch on Windows; the shipped Safari and Firefox apps (the automated tests use their engines), and a reload of an embedded page in Firefox and Safari.

Computer certificates

A certificate is how a Windows computer proves who it is. Without that check, someone in between could pretend to be the computer and catch the passwords users type. So the certificate Windows makes for itself is refused until you do one of these for each computer:

WayHow
1 Pin itRead its fingerprint (SHA-256) where the Anping server runs: dotnet Gateway.dll rdp-fingerprint host[:port]. Check it on the computer itself, then set Targets__N__CertFingerprints__0=sha256:...
Technical detailIn the development stack: scripts/rdp-fingerprint.sh host[:port]. For a computer named in links: Oturl__ComputerSettings__N__Computer=<host> and Oturl__ComputerSettings__N__CertFingerprints__0=sha256:... Windows renews its self-signed certificate when it expires (the tool prints the date): add the new fingerprint before then, and keep the old one until no computer presents it.
2 Or give it a certificateOne for the name in Host (or computer), from a certificate authority (CA) the desktop engine trusts.
Technical detailAn enterprise (Active Directory) authority has to be added to that image, which comes with Anping's own engine image; until then, pin.

Dry run with your real requests

Before you switch, replay the requests your program sent to Thinfinity. /ws/oturl/check tells you what /ws/oturl/get would do, without making a link (dry run).

ANPING_API_KEY=... node scripts/oturl-replay.mjs --gateway https://anping.example.com requests.txt
StepWhat the replay tool does
ReadsOne request per line: a web address or path with /ws/oturl/get?..., a log line that contains one, the part after ?, or POST <form body>.
MoreBlank lines and # comments are skipped.
Keeps secrets outRemoves the file's API keys, hides passwords and user names, sends your key (ANPING_API_KEY) in the request body (POST), and never prints the lines it reads.
PrintsA row per request, then totals over the file.
MoreEach row: accepted or refused, mode, model, first problem. Then every problem, parameter without effect and difference from Thinfinity, counted over the file. --json prints each answer.
ThenFix what is refused, in your program or the model, read the rest, then switch the address.

Parallel run and rollback

Rollout: set Anping up next to Thinfinity, dry run with real requests, a pilot group, switch the host name keeping GET, and switch to POST once Thinfinity is no longer the rollback. Thinfinity keeps running: rollback is the host name back Set up Anping next to Thinfinity 1 Dry run your real requests 2 Pilot group one model, a few users 3 Switch the host keep GET 4 After cutover switch to POST 5 Host name and API key come from configuration, so each switch is a configuration change. Rollout: set Anping up next to Thinfinity, dry run with real requests, a pilot group, switch the host name keeping GET, and switch to POST once Thinfinity is no longer the rollback. Thinfinity keeps running: rollback is the host name back Set up Anping next to Thinfinity 1 Dry run your real requests 2 Pilot group one model, a few users 3 Switch the host keep GET 4 After cutover switch to POST 5 Host name and API key come from configuration, so each switch is a configuration change.
Steps 1 to 4 keep Thinfinity as the rollback.

To roll back, point the address back to Thinfinity. Links already handed out open only on the server that made them and expire after expires minutes; open Anping sessions last until the user disconnects.

Step by step
  1. Keep Thinfinity running and unchanged while you set up Anping next to it.
  2. Put the host name and API key in your program's configuration.
  3. Replay a few days of requests with the dry run; fix what it reports.
  4. Keep sending GET (values in the address) while Thinfinity is your way back: both accept the same request.
  5. Move a pilot group first (one model, or a few users) and run the tests below with them.
  6. After cutover, switch to POST (Anping only): the API key stays out of URLs and logs.

Checklist

Deployment 7
Anping server settings 5
Your program 4
Test 6