{"id":997181,"date":"2021-06-30T16:01:00","date_gmt":"2021-06-30T08:01:00","guid":{"rendered":"https:\/\/geetests.com\/article\/guide-of-configuring-failback-n-bypass-mode"},"modified":"2025-09-15T12:17:05","modified_gmt":"2025-09-15T04:17:05","slug":"guide-of-configuring-failback-n-bypass-mode","status":"publish","type":"post","link":"\/en\/article\/guide-of-configuring-failback-n-bypass-mode","title":{"rendered":"Step-by-step instructions to see how to make your CAPTCHA service stable and robust"},"content":{"rendered":"<div class=\"vgblk-rw-wrapper limit-wrapper\">The <strong>reputation<\/strong> of your digital commerce businesses might be severely <strong>tarnished<\/strong> by one <strong>outage<\/strong> . Unfortunately, outages and downtimes <strong>cannot be completely<\/strong> avoided. As known, many of our clients deploy GeeTest CAPTCHA at the crucial gateways. Our tech team upgraded our Failback mode to ByPass mode, which is <strong>more robust to<\/strong> the unexpected incidents, out of the concern that the clients&#8217; online business might be affected by CAPTCHA down. The previous Failback mode is the mechanism of <strong>making CAPTCHA <\/strong>service <strong>offline<\/strong> when GeeTest CAPTCHA is down, to avoid any <strong>interruption<\/strong> to the <strong>normal business process.<\/strong> There is downside of Failback mode. Despite the situation is extreme and rare, the Failback mode won&#8217;t be started if the service is <strong>still intermittently available<\/strong>. The ByPass API enables you knowing the latest status before communicating with GeeTest server, <strong>minimizing the risk<\/strong> of jeopardizing the business process. Even though we guarantee 99.9% SLA, the Force Majeur is not in our control. Therefore, ByPass mode and such disaster recovery mechanism were developed to ensure complete satisfaction.<\/p>\n<p>If you are still using old version SDK, the Failback mode is still effective. You can proceed to the Failback part for instructions. We also provide the option for you to switch to newer version SDK and the latest SDK files can found in the developer&#8217;s <a href=\"https:\/\/docs.geetest.com\/captcha\/deploy\/server\/csharp\" target=\"_blank\" rel=\"noopener noreferrer\">documentation<\/a>. Choose the programming language before downloading the SDK. The new version SDK contains new gt.lib file and demo code, offering the detailed instructions for you to configure ByPass mode. Technically, you can simply replace gt.lib file with the new one in your existing SDK.<\/p>\n<h2><strong>ByPass mode<\/strong><\/h2>\n<p>In general, our SDKs provide demo code assisting you do the implementation. As we observe from our clients who are using our service, most of them would ignore the part of configuring ByPass mode, which is crucial for handling unforeseen circumstance. A detailed guide with sample code will be introduced here so that you will have a better understanding of how ByPass mode can be implemented and how it works.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/geetests.com\/wp-content\/uploads\/2025\/09\/1-5.png\" alt=\"\"><\/p>\n<p>There are 2 approaches to configure ByPass mode. Please note that all the instructions are given in the example of NodeJS and we offer SDKs in C#, Java, NodeJS, Php, Python and Golang.<\/p>\n<h3><strong>Setting the bypass_status<\/strong><\/h3>\n<ul>\n<li>Use standalone functions to check and update server status periodically. The sample code in SDK provides one of many methods to write the checking logic.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/github.com\/GeeTeam\/gt3-server-node-express-bypass\/blob\/5f3593400dadb304e35e75bfce469857f5a23c0a\/app.js#L14\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/GeeTeam\/gt3-server-node-express-bypass\/blob\/5f3593400dadb304e35e75bfce469857f5a23c0a\/app.js#L14<\/a><\/p>\n<p>Use polling function to periodically make API request to check the status.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/geetests.com\/wp-content\/uploads\/2025\/09\/2-4.png\" alt=\"\"><\/p>\n<p>Write the bypass_status into database and keep updating.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/geetests.com\/wp-content\/uploads\/2025\/09\/3-4.png\" alt=\"\"><\/p>\n<p>Once the CAPTCHA service is initiated, bypass status has to be checked every time when primary request(\/register.php) and secondary request(\/validate.php) are made. If the status is fail, then both of your client side and server side won&#8217;t communicate with GeeTest server and the CAPTCHA service will go offline mode.<\/p>\n<ul>\n<li>Make the instant API request to check bypass_status before the primary request(\/register.php) and secondary request(\/validate.php). This approach is suitable for the user who doesn&#8217;t have enough DB space for storing the extra parameters and has concern about resource consumption from periodically checking the status.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/github.com\/GeeTeam\/gt3-server-node-express-bypass\/blob\/5f3593400dadb304e35e75bfce469857f5a23c0a\/app.js#L61\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/GeeTeam\/gt3-server-node-express-bypass\/blob\/5f3593400dadb304e35e75bfce469857f5a23c0a\/app.js#L61<\/a><\/p>\n<p>The following code is re-written on the basis of sample code.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/geetests.com\/wp-content\/uploads\/2025\/09\/4-3.png\" alt=\"\"><\/p>\n<h3><strong>What to do after setting the bypass_status?<\/strong><\/h3>\n<p>In the primary verification(\/register.php) process, call localRegister() method in gt lib and set the result.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/geetests.com\/wp-content\/uploads\/2025\/09\/5-3.png\" alt=\"\"><\/p>\n<p>In the secondary verification(\/validate.php) process, call failValidate() method and set the result.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/geetests.com\/wp-content\/uploads\/2025\/09\/6-2.png\" alt=\"\"><\/p>\n<p>During both processes, frontend will be notified and the field <span class=\"ql-font-monospace\">offline <\/span>in initGeetest() method is set to false. Then the bar will be presented with an orange sign on the right upper corner to indicate the offline mode. Then you will know that CAPTCHA service is currently in offline mode.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/geetests.com\/wp-content\/uploads\/2025\/09\/7-1.png\" alt=\"\"><\/p>\n<h2><strong>Failback mode <\/strong><\/h2>\n<p>The Failback mode is still effective if you are using the old version SDK. Simply set failback status in session as true or false, then it can enter the offline mode and the communication with GeeTest&#8217;s server will be cut.<\/p>\n<p><a href=\"https:\/\/github.com\/GeeTeam\/gt3-node-sdk\/blob\/master\/demo\/app.js#L18\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/GeeTeam\/gt3-node-sdk\/blob\/master\/demo\/app.js#L18<\/a><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/geetests.com\/wp-content\/uploads\/2025\/09\/8-1.png\" alt=\"\"><\/p>\n<h3><\/h3>\n<h2><strong>How to test?<\/strong><\/h2>\n<h3><strong>To test it on your own<\/strong><\/h3>\n<p>Method 1: Change GEETEST_ID in the config file to some invalid value like 1234567890.<\/p>\n<p>Method 2: Change BYPASS_URL in the config file to some invalid address like <a href=\"http:\/\/www.google.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.google.com<\/a><\/p>\n<p>Method 3: Modify hosts file to direct <a href=\"http:\/\/bypass.geetest.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">bypass.geetest.com<\/a> to invalid IP<\/p>\n<h4><\/h4>\n<h3><strong>Contact GeeTest service team<\/strong><\/h3>\n<p>Contact GeeTest service team and provide the CAPTCHA ID on which you want to test. Then the fail status will be sent from GeeTest server and you&#8217;ll be able to see that CAPTCHA service goes to offline.<\/p>\n<h2><strong>Final thoughts:<\/strong><\/h2>\n<p><strong>It should be noted<\/strong> that the offline mode has very <strong>LIMITED<\/strong> protection capability and it&#8217;s designed for guaranteeing normal business process under the <strong>extreme circumstances<\/strong>. The good practice is that switching to other authentication methods to fully ensure the safety and security once the issue happens.<\/div>\n<p><!-- .vgblk-rw-wrapper --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GeeTest plans ahead of the outage and downtime and always keeps its clients safe. Follow this step-by-step instruction to see how to make your CAPTCHA service more stable and robust.<\/p>\n","protected":false},"author":2,"featured_media":996496,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[90],"tags":[],"class_list":["post-997181","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cyberwatch"],"_links":{"self":[{"href":"\/en\/wp-json\/wp\/v2\/posts\/997181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"\/en\/wp-json\/wp\/v2\/comments?post=997181"}],"version-history":[{"count":2,"href":"\/en\/wp-json\/wp\/v2\/posts\/997181\/revisions"}],"predecessor-version":[{"id":997644,"href":"\/en\/wp-json\/wp\/v2\/posts\/997181\/revisions\/997644"}],"wp:featuredmedia":[{"embeddable":true,"href":"\/en\/wp-json\/wp\/v2\/media\/996496"}],"wp:attachment":[{"href":"\/en\/wp-json\/wp\/v2\/media?parent=997181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/en\/wp-json\/wp\/v2\/categories?post=997181"},{"taxonomy":"post_tag","embeddable":true,"href":"\/en\/wp-json\/wp\/v2\/tags?post=997181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}