dsh-photo2dsh-by-lan: One-Click LAN Transfer of Mobile Phone Photos to PC Folders

Preface

When developing or running agents with DeepSeek Harness (DSH), you may need to retrieve images from your phone as input, or transfer debugged screenshots back to your PC. Directly uploading to cloud storage poses privacy risks, while transferring through IM software tends to mix files with other messages.

dsh-photo2dsh-by-lan focuses on solving this scenario: no app installation required on the mobile side. Simply use Shortcuts or an HTTP tool to POST photos to a specified port on your PC with one click. The PC-side plugin receives them, writes them to a folder, and simultaneously pops up a Windows notification.

Plugin Overview

This is a DSH plugin focused on LAN (Local Area Network) transfers. It does not rely on cloud services, does not interfere with IM software, and does not require modifying the system’s app.asar file.

Core Capabilities:
* One-click Send from Mobile: Supports iOS Shortcuts and Android HTTP Shortcuts.
* Controlled Landing Directory: Configure the target folder in the plugin panel; supports automatic creation of date-based subdirectories.
* Agent-Readable: Files land in a regular directory, allowing DSH Agents to directly read, write, and analyze them.
* Non-intrusive Notifications: Triggers a Windows Toast when files arrive.
* Security Validation: Token validation enabled by default; listening scope is limited to the local area network.

Installation and Activation

Run the following command in the terminal to install the plugin:

dsh plugin --profile desktop add dsh-photo2dsh-by-lan

After installation, the plugin will load when DSH starts. Since it needs to listen on a LAN port, firewall rules must be configured once (this is the only step requiring administrator privileges):

netsh advfirewall firewall add rule name="DSH Photo2DSH" dir=in action=allow protocol=TCP localport=8787 profile=any

Note: The rule must include profile=any. If you only configure a public rule while on a private network, Windows will silently drop packets, causing the mobile side to report “Server Stopped Responding”.

After configuration, restart DSH to load the plugin client.

Configuration Panel

Navigate to Plugins in the DSH sidebar, find the dsh-photo2dsh-by-lan package, and click the configuration card. The main fields are described below:

Field Description
Landing directory The directory where photos land. The plugin automatically creates <date> subfolders under it.
Port Default is 8787. Changing the port requires syncing the firewall rule update.
Max file size (MB) Default is 64MB. Uploads exceeding this size will be rejected.
Toast on arrival Enabled by default. Pops up a notification when files land.
Require token Enabled by default. When enabled, the URL must contain a Token; when disabled, anyone on the LAN can transfer files.

It is recommended to set the landing directory within the current Session Workspace to ensure the Agent has read permissions.

Typical Usage

iOS Shortcuts

  1. Select Photo: Add “Select Photos” or “Take Photo”.
  2. Convert to JPEG: Add “Convert Image”, set the output format to JPEG with 80% quality. This is crucial; otherwise, large images will become highly compressed PNGs, taking up significant space and potentially causing format detection errors.
  3. Send Request: Add “Get Contents of URL”.
    • URL: Enter the address from the plugin configuration page.
    • Method: Set to POST.
    • Request Body: Set to File.
    • ⚠️ Critical Step: The File field must point to the “Converted Image” generated in the previous step, not the original photo.
  4. Execute: Click Run. On success, a text prompt will return, indicating the file has been saved to the PC.

On the first access within the LAN, iPadOS will pop up a window asking for permission to access local network devices; you must click Allow.

Android

Use HTTP Shortcuts or similar tools on Android.
The URL is the same as iOS. Set the Method to POST, Body type to File, and select the local image file.

File Landing Format

The directory structure after photos land is as follows:

<Your Landing Directory>\
  └─ 2026-10-03\
       ├─ 20261003232612-4d2b993e-image.jpg
       └─ 20261003232612-4d2b993e-image.json
  • Filename: Local timestamp + first 8 characters of SHA256 + sanitized filename.
  • Same-name Overwrite: Uploading files with the same name within the same second will not overwrite; suffixes like -1, -2 will be added automatically.
  • Format Detection: The file format is determined by magic bytes, not the Content-Type header.

Notes

  • Windows Only: The plugin only supports the Windows system.
  • Toast Display Name: The app name in Windows notifications displays as “Windows PowerShell”, unless AUMID is manually registered.
  • Uninstall Does Not Delete Data: Uninstalling the plugin does not delete received local photo files.
  • Default Token: Require token is enabled by default. Please do not disable it arbitrarily, otherwise malicious requests within the LAN can write files.
  • Security Boundary: The plugin only listens on the local network and is not exposed to the public internet. However, if token validation is disabled, any device on the LAN can access it.

Summary

dsh-photo2dsh-by-lan provides a localized, lightweight photo transfer solution. For DSH agent developers who frequently need to retrieve images from their phones, it is an efficient tool that bypasses cloud services, keeps data localized, and requires no complex configuration.

  • Directory Page: https://www.skillhub.cn/plugins/apherchin/dsh-photo2dsh-by-lan
  • Source Code: https://github.com/apherchin/dsh-photo2dsh-by-lan
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye