特殊字元
如果您的遠程服務器需要身份驗證,您可以在輸入的 url 字符串中包含用戶名和密碼。用戶名和密碼應包含以下特殊字符( 百分比編碼) :
| 字元 | 百分比編碼 |
|---|---|
| ] | %5B |
| [ | %5D |
| ? | %3F |
| / | %2F |
| < | %3C |
| ~ | %7E |
| # | %23 |
| ` | %6D |
| ! | %21 |
| @ | %40 |
| $ | %24 |
| % | %25 |
| ^ | %5E |
| & | %26 |
| * | %2A |
| ( | %28 |
| ) | %29 |
| + | %2B |
| = | %3D |
| } | %7D |
| | | %7C |
| : | %3A |
| 「 | %22 |
| ; | %3B |
| ' | %27 |
| , | %2C |
| > | %3E |
| { | %7B |
| 空間 | %20 |
範例:
- http://example.com/path/to/input.avi
- https://example.com/path/to/input.mov
- ftp://example.com/path/to/input.mp3
- sftp://example.com/path/to/input.3gp
- https://s3.amazonaws.com/bucket-name/input.mpeg
- s3://bucket-name/input.mpeg(完整 HTTP S3 url 的簡寫)
示例(使用用戶名“user”和密碼“pass!word”):
- http://user:pass%21word@example.com/path/to/input.avi
- https://user:pass%21word@example.com/path/to/input.mov
- ftp://user:pass%21word@example.com/path/to/input.mp3
- sftp://user:pass%21word@example.com/path/to/input.3gp
- ftp://user:pass%21word@example.com/path/to/input.mp3
一些服務器要求用戶名包括您的域名(用戶名“user@example.com”和密碼“pass!word”):
- http://user%40example.com:pass%21word@example.com/path/to/input.avi
- https://user%40example.com:pass%21word@example.com/path/to/input.mov
- ftp://user%40example.com:pass%21word@example.com/path/to/input.mp3
- sftp://user%40example.com:pass%21word@example.com/path/to/input.3gp
- ftp://user%40example.com:pass%21word@example.com/path/to/input.mp3