Extension:CheckUser/zh


 * 這是一個關於擴展本身的頁面. 關於維基媒體基金會的用户查核政策，見用户查核方针. 

CheckUser是一个允许拥有 权限的用户查核给定IP地址下的用户和给定用户使用的IP地址的，而无须手动在数据库运行查询的扩展. 這個擴展正運作在所有維基媒體的維基項目上.

安裝
这个扩展在GNU GPL2.0或更新版协议下发布. 這個软件由As is提供. 更新会随着安装了MediaWiki的Wiki站点的需求来进行，或者是根据严格地检查出的有价值的可更新处.



基本
如果您已安装其他不需要运行 的扩展，请运行一次.



在无命令行访问下安装
很多的托管提供商不允许直接访问shell，但允许创建cron任务（例如通过cPanel的网页界面）. 对于这些提供了临时cron任务的托管提供商，可以用于运行 （自然 需要被替换成完整的 路径）. 若您使用远程服务器且没有命令行访问权限（且使用cron任务的方案不适用于您），但是还是可以访问phpMyAdmin，跳过步骤＃2的这些步骤：


 * 1) Find the tables-generated.sql file in the   folder of your copy of the CheckUser extension. Navigate in to the folder of the DB you are running to find the file.
 * 2) 在phpMyAdmin中，点击左侧您MediaWiki使用的数据库
 * 3) 在下一屏幕上，点击顶部导入标签.
 * 1) 在“从计算机中上传”，选择要上传的文件之一，将压缩选项选为“无”，并点击“执行”按钮.
 * 若您的phpMyAdmin只显示一个文本域且没有文件选择，点击左上角栏上的“SQL”，在phpMyAdmin的Logo下方，然后在打开的新窗口中单击“导入文件”选项卡.



在新的wiki上
按照上述步骤1，然后运行MediaWiki安装. MediaWiki安装程序将自动执行安装任务，若您在选择安装哪些扩展时选中了CheckUser.

Using MediaWiki-Docker
Follow the steps in to install this extension inside a MediaWiki Docker instance.

-{zh-hans:配置; zh-hant:組態;}-
这个工具讲最近更改日志迁移到单独的$changes列表，创建新条目也会加入到这个列表中. 如果先前将 设置为 ，则没有初始数据可供搜索，但最新的编辑将会在设置完成后立即生成. However, entries added after installation of this extension will contain the IP address.

当您进行查询时，您可以降低 来使显示最近更改列表变短而不影响Checkuser. 使用 设置checkuser的查询日期，以秒为单位.

在Mediawiki 1.22以及往后的版本，checkuser特殊的设置$wgCheckUserCIDRLimit规定了单次查核中查核的最大范围. 他的格式与设置相同. 否则，对于 检查，默认限制（对于所有版本）为 ，对于 检查，默认限制为.

To allow this tool to log successful and failed login attempts as well as logouts, set  to. If you have bot accounts on your wiki, setting  to  will skip logging successful login attempts to bot accounts.



授权权限以使用用户查核
要授予用户用户查核员权限，具有用户权限管理的用户需要在Special:UserRights中添加要加入用户的用户名到候选框中. 然后选择”用户查核员“. 完成此操作后，“用户查核”选项将显示在该用户的Special:SpecialPages页面上.

To allow users to access the IP addresses of temporary accounts, they should be granted the checkuser-temporary-account right.

要为sysops启用用户权限管理，请将以下内容放入 ：

要仅允许添加和删除 权限，请使用以下代码：

-{zh-hans:配置; zh-hant:組態;}-


Special:CheckUser 用法


基本界面
Try to succinctly summarise the situation (for example, "cross-wiki spam"); this will be logged in a log visible only to users with the  permission.
 * 1) 前往Special:CheckUser.
 * 2) 在“user”字段中，输入用户名（不带 前缀），IP网址或CIDR范围.
 * 3) * IP：任何IPv4或IPv6网址.
 * 4) * CIDR: you can check a range of IP addresses by appending the CIDR prefix. The CIDR prefix value for IPv4 can be between 16-32 and the value for IPv6 can be between 19-128. The smaller number for both ranges can be changed using the configuration variable $wgCheckUserCIDRLimit. For notation, see.
 * 1) * XFF: you can check a client IP address provided by X-Forwarded-For headers by appending  (for example,  ).
 * 1) Select the information you want to retrieve.
 * 1) *  - returns IP addresses used by a registered user.
 * 2) *  - returns all edits and logged actions made by users using an IP address or range specified in the target field, or if the target is a user all edits and logged actions by that user.
 * 3) *  - returns user accounts that have edited from an IP or range.
 * 1) In the "" field, type in the reason you are accessing the confidential data.



显示的信息
用户查核结果中的典型条目是用户摘要（“获取用户”）如下：


 * Example (talk | contribs | block) (Check) (20:11, -- 20:12, ) [5]
 * 127.0.0.37 XFF: 127.0.0.1, 127.0.0.5
 * Example user agent
 * Example user agent

这种格式适合将大量信息整合到一种非常容易列出和删除的格式中，但除非您知道所提供的信息，否则很难阅读. 信息如下：


 * 用户名 (用户连接) (从给定的IP或范围编辑的时间段：) [来自IP或范围的编辑数]
 * 來自編輯的IP地址 XFF: 提供XFF信息（可以被欺骗）

按使用顺序列出用于编辑的每个IP / XFF组合.

后面列出了每个用户在IP或范围内进行编辑的最后十个用户代理（浏览器、操作系统、系统语言和版本）.



XFF格式
XFF (X-Forwarded-For) headers indicate the series of IP addresses used from the user's computer (first) to the last proxy server. In case of Wikimedia, the last proxy server is one of the Wikimedia proxies (listed under in the Wikimedia configuration file).

另一个例子

aaa.aaa.aaa.aaa       XFF: 10.4.46.42, 127.0.0.1, aaa.aaa.aaa.aaa, 208.80.152.46


 * 前两个地址（ 、 ）是原始网络专用的，无法直接从公共互联网访问，
 * 第三个地址（ ）是编辑器的“公共面孔”，通常是宽带或拨号ISP，公司网关（但可能是匿名者或受恶意软件攻击的服务器），
 * 最后一个地址（ ）是维基媒体Squid之一（ ）.

MediaWiki configuration settings, , and extensions using the  hook (such as ) change the way an actual IP address used to attribute edits is selected.



个人工具链接
When you get results from Special:CheckUser you can add personal user tool links via the following interface messages:


 * for IP addresses (for example m:MediaWiki:checkuser-userlinks-ip)
 * for registered users (for example m:MediaWiki:Checkuser-userlinks)
 * for IPs in the 'Get IP Addresses' check type (for example m:MediaWiki:checkuser-toollinks)
 * for IP ranges produced by the CIDR calculator present at the bottom of all Special:CheckUser pages. Interface message added in 1.41.



Special:Investigate 用法


基本用法

 * 1) 前往Special:Investigate.
 * 2) In the  field, type in up to 10 targets, which may be usernames (without the   prefix), IP addresses, or CIDR ranges.
 * 3) In the  field, enter the reason you are accessing the confidential data, as described in the Special:CheckUser instructions above; this will be logged in a log visible only to users with the checkuser-log permission.

For advanced feature usage, see Help:Special Investigate.



定制工具链接
As with Special:CheckUser, links to external tools can be customized.

The links are defined in the  message. This message is parsed to find links, which are added to the menu in the  tab.

Showing IPs for temporary accounts
The CheckUser extension will show since MediaWiki 1.40 a button that is displayed next to temporary account user links which allows the revealing of their IP address.

This functionality is available exclusively to users with the  privilege, granting them the ability to view the IP addresses that are linked to temporary accounts. To access this information, the Enable revealing IP addresses for temporary accounts feature must be enabled on the user's Special:Preferences page.

These buttons will appear wherever user links are shown for a temporary account, such as when viewing page histories or in Special:Contributions. However, these will not be shown on Special:CheckUser, Special:Investigate or Special:InvestigateBlock.

CheckUser and CheckUserLog API
用户查核也提供API. These two APIs work fairly similarly to the special pages, but the reason for a check using the API is prefixed with "API:" to indicate they were made using the API. Example usages of these APIs are shown below.

api.php?action=query&list=checkuser&curequest=userips&cutarget=Jimbo_Wales api.php?action=query&list=checkuser&curequest=edits&cutarget=127.0.0.1/16&xff=1&cureason=Some_check
 * CheckUser API

api.php?action=query&list=checkuserlog&culuser=WikiSysop&cullimit=25 api.php?action=query&list=checkuserlog&cultarget=127.0.0.1&culfrom=20111015230000
 * CheckUserLog API

Temporary Account Reveal API
 Usage 

The TemporaryAccountHandler class offers API endpoints for retrieving the IP addresses associated with temporary user accounts. To access this information, the Enable revealing IP addresses for temporary accounts feature must be enabled on the user's Special:Preferences page.

 API endpoint 

where  is the user name you want to look up

 Response 

If the request is successful, the API will respond with a JSON object containing the following fields: If the request fails, the API will respond with an appropriate error code and message.

 Example request 

 Example response 

TemporaryAccountRevisionHandler
The TemporaryAccountRevisionHandler class offers API endpoints for viewing the IP associated with a revision for temporary accounts. You can specify one or multiple revision IDs in the query string.

 API endpoint 

where  is the revision ID(s) you want to look up separated by the   character.

 Response 

If the request is successful, the API will respond with a JSON object containing the following fields:

If the request fails, the API will respond with an appropriate error code and message.

 Example request 

 Example response 

 Example request with multiple revisions 

 Example response