Menu

Proxy settings

This page is generated by Machine Translation from Japanese.

For the crawler proxy settings

If you like crawling external sites from within the intranet firewall may end up blocked crawl. Set the proxy for the crawler in that case.

How to set up

Proxy is set in to create webapps/ Fess /Web-INF/classes/s9robot_client.dicon with the following contents.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
    "http://www.seasar.org/dtd/components24.dtd">
<components>
    <include path="s2robot_robotstxt.dicon"/>
    <include path="s2robot_contentlength.dicon"/>

    <component name="internalHttpClient"
        class="org.codelibs.robot.client.http.HcHttpClient" instance="prototype">
        <property name="cookieSpec">@org.apache.http.client.params.CookiePolicy@BEST_MATCH</property>
        <property name="clientConnectionManager">clientConnectionManager</property>
        <property name="proxyHost">"プロキシサーバー名(ex. 192.168.1.1)"</property>
        <property name="proxyPort">プロキシサーバーのポート(ex. 8080) (" は不要)</property>
        <!-- プロキシに認証がある場合
        <property name="proxyCredentials">
            <component class="org.apache.http.auth.UsernamePasswordCredentials">
                <arg>"プロキシ用ユーザー名"</arg>
                <arg>"プロキシ用パスワード"</arg>
            </component>
        </property>
        -->
    </component>
    <component name="httpClient"
        class="org.codelibs.robot.client.FaultTolerantClient" instance="prototype">
        <property name="robotClient">internalHttpClient</property>
        <property name="maxRetryCount">5</property>
        <property name="retryInterval">500</property>
    </component>

    <component name="clientConnectionManager"
        class="org.apache.http.impl.conn.PoolingHttpClientConnectionManager">
        <arg>5</arg><!-- timeToLive -->
        <arg>@java.util.concurrent.TimeUnit@MINUTES</arg><!-- tunit -->
        <!-- Increase max total connection to 200 -->
        <property name="maxTotal">200</property>
        <!-- Increase default max connection per route to 20 -->
        <property name="defaultMaxPerRoute">20</property>
        <destroyMethod name="shutdown"></destroyMethod>
    </component>

    <component name="fsClient"
        class="org.codelibs.robot.client.fs.FileSystemClient" instance="prototype">
        <property name="charset">"UTF-8"</property>
    </component>

    <component name="smbClient"
        class="org.codelibs.robot.client.smb.SmbClient" instance="prototype">
        <property name="charset">"UTF-8"</property>
        <!-- ntlmPasswordAuthentication -->
    </component>

    <component name="clientFactory"
        class="org.codelibs.robot.client.S2RobotClientFactory" instance="prototype">
        <initMethod name="addClient">
            <arg>{"http:.*", "https:.*"}</arg>
            <arg>httpClient</arg>
        </initMethod>
        <initMethod name="addClient">
            <arg>"file:.*"</arg>
            <arg>fsClient</arg>
        </initMethod>
        <initMethod name="addClient">
            <arg>"smb:.*"</arg>
            <arg>smbClient</arg>
        </initMethod>
    </component>

</components>