-
Setup Environment:
- Ensure you have access to devices running on a Windows machine.
- Deploy the Clash API client if needed, or ensure it's installed on your system.
-
Run the Script:
- Open a terminal or command prompt.
- Execute the provided script using the command:
python clash_test.py
-
Script Execution:
- The script will connect to all devices and test their connectivity and unique IPs.
- It will log errors for problematic devices and terminate upon the first failure.
-
Understanding Output:
- The script logs errors for unsupported IPs, disconnected devices, or devices without unique IPs.
- It stops when a device fails the test, providing clear feedback.
-
Considerations:
- The port used (191) might need verification.
- Ensure all device objects are correctly referenced and have the
getUniqueIP()method. - Adjust the test waiting time if necessary for longer runs.
-
Error Handling:
- Wrap the sending request in a try-except block to handle exceptions during tests.
- Test in isolated environments to prevent interference between devices.
-
Command Line Configuration:
- For local devices, deploy the script on your server or machine.
- For remote devices, use a web interface or a tool to access them.
-
Testing Strategy:
- Test all devices before deploying.
- Use the script to identify and fix devices with connectivity issues.
By following these steps, you can effectively test Clash for Windows network connectivity, ensuring all devices are functioning as expected.




