Testing Options for cxprotect.com

Endpoint documentation, browser testing, and curl examples.

1. Static File Serving

Serves static files directly from the root web directory.

Browser Test: /index.html
curl Direct:
curl https://www.cxprotect.com/index.html
curl via Proxy:
curl -x 127.0.0.1:8080 -I https://www.cxprotect.com/index.html

2. File Upload Form (Interactive)

Standard HTML multipart/form-data interface for single file uploads.

Browser Test: /upload-form
curl Direct:
curl -X POST -F "file=@/path/to/local/file.txt" https://www.cxprotect.com/upload
curl via Proxy:
curl -x 127.0.0.1:8080 -X POST -F "file=@/path/to/local/file.txt" https://www.cxprotect.com/upload

3. Multiple File Upload

Upload multiple files simultaneously using the files field name.

Browser Test: /upload-multiple (Multiple)
curl Direct:
curl -X POST -F "files=@file1.txt" -F "files=@file2.txt" https://www.cxprotect.com/upload-multiple
curl via Proxy:
curl -x 127.0.0.1:8080 -X POST -F "files=@file1.txt" -F "files=@file2.txt" https://www.cxprotect.com/upload-multiple

4. Direct Binary Upload

Upload raw binary data. Requires specific Content-Type headers.

curl Direct:
curl -X POST --data-binary "@/path/to/file.zip" -H "Content-Type: application/zip" "https://www.cxprotect.com/upload-direct?filename=test.zip"
curl via Proxy:
curl -x 127.0.0.1:8080 -X POST --data-binary "@/path/to/file.zip" -H "Content-Type: application/zip" "https://www.cxprotect.com/upload-direct?filename=test.zip"

5. Directory Listing (JSON API)

Returns a metadata list of files in the download directory.

Browser Test: /downloads (JSON)
curl Direct:
curl "https://www.cxprotect.com/downloads?type=file&sort=name"
curl via Proxy:
curl -x 127.0.0.1:8080 "https://www.cxprotect.com/downloads?type=file&sort=name"

6. Sample File Downloads

Download actual sample files. Supports HTTP Range requests for partial download testing.

curl Direct (Range):
curl -H "Range: bytes=0-1048576" https://www.cxprotect.com/downloads/swgaudit.exe -o partial.exe
curl via Proxy:
curl -x 127.0.0.1:8080 -H "Range: bytes=0-1048576" https://www.cxprotect.com/downloads/swgaudit.exe -o partial.exe

7. Simulate Response Delay

Simulates a server-side wait. Useful for testing timeout thresholds.

Browser Test: 5s Delay
curl Direct:
curl https://www.cxprotect.com/simulate_delay/10
curl via Proxy:
curl -x 127.0.0.1:8080 https://www.cxprotect.com/simulate_delay/10

8. Return Specific HTTP Status

Forces the server to return a specific code (100-599).

Browser Test: Status 418
curl Direct:
curl https://www.cxprotect.com/status/500
curl via Proxy:
curl -x 127.0.0.1:8080 -i https://www.cxprotect.com/status/500

9. No Response Body

Returns a status code (default 204) with an empty body.

Browser Test: 403 No Body
curl Direct:
curl "https://www.cxprotect.com/no_response?code=204"
curl via Proxy:
curl -x 127.0.0.1:8080 -i "https://www.cxprotect.com/no_response?code=204"

10. Chunked Transfer Encoding

Streams response content in chunks with 1-second intervals.

Browser Test: Stream Data
curl Direct:
curl -N https://www.cxprotect.com/transfer-encoding
curl via Proxy:
curl -x 127.0.0.1:8080 -i -N https://www.cxprotect.com/transfer-encoding

11. Compressed Data

Tests gzip and deflate compression handling.

Browser Test: Compressed Response
curl Direct:
curl -H "Accept-Encoding: gzip" --compressed https://www.cxprotect.com/compressed-data
curl via Proxy:
curl -x 127.0.0.1:8080 -H "Accept-Encoding: gzip" --compressed https://www.cxprotect.com/compressed-data

12. Generate Content Size

Generates random data of specific size (e.g., 500, 10K, 2M, 1G).

Browser Test: 100KB Random
curl Direct:
curl https://www.cxprotect.com/content-size/1M
curl via Proxy:
curl -x 127.0.0.1:8080 https://www.cxprotect.com/content-size/1M

13. Client-Side Blob & Worker

Testing for Blob URL generation and Web Workers.

Browser Test: Blob Generator
curl Direct:
curl "https://www.cxprotect.com/blob?size=1024&filename=test.bin"
curl via Proxy:
curl -x 127.0.0.1:8080 "https://www.cxprotect.com/blob?size=1024&filename=test.bin"

14. CSP Testing Lab

Comprehensive interactive page for testing multiple CSP directives.

Browser Test: Launch CSP Lab
curl Direct (Header Check):
curl https://www.cxprotect.com/testcsp
curl via Proxy:
curl -x 127.0.0.1:8080 -I https://www.cxprotect.com/testcsp

15. CSP Trusted Types

Specific testing for require-trusted-types-for 'script'.

Browser Test: Launch TT Lab
curl Direct:
curl https://www.cxprotect.com/csp_tt
curl via Proxy:
curl -x 127.0.0.1:8080 -I https://www.cxprotect.com/csp_tt

16. CSP Violation Reporting

Endpoint that receives and logs CSP violation reports (POST).

curl Direct (Manual Report):
curl -X POST -H "Content-Type: application/csp-report" -d '{"csp-report":{"document-uri":"https://www.cxprotect.com/testcsp","violated-directive":"script-src"}}' https://www.cxprotect.com/csp_reports
curl via Proxy:
curl -x 127.0.0.1:8080 -X POST -H "Content-Type: application/csp-report" -d '{"csp-report":{"document-uri":"https://www.cxprotect.com/testcsp","violated-directive":"script-src"}}' https://www.cxprotect.com/csp_reports