
const gamevarLines = [
    'var_name,comment,var_type,var_value',
    'var_name,comment,"var_type float, int, bool",var_value',
    'ANODisabledRegions,关闭MTP的地区,string,"ID"',
    'ANODisabledClientVariant,ANODisabledClientVariant,string,"ID"',
    'EnableMtpLiteDataRegion,mtp轻特征开关,string,"BR,EUROPE,ID,ME,US,RU,SAC,SG,TH,TW,VN,PK,ZA,BD"',
    'ANOEmulatorCheckDisbaledClientVariant,ANOEmulatorCheckDisbaledClientVariant,string,""',
    'ForceTutorial_ChangeHudABTest,fps流程中打开hud选择界面的概率,float,-1',
    '',
    'CleanFFAntiState,CleanFFAntiState,bool,true,,',
    'FFAntihackDefenceLevel,FFAntihackDefenceLevel,string,0,,',
    'FFAntihackLightInitOnThread,FFAntihackLightInitOnThread,bool,false,,',
    'FFAntihackEmulatorCheckDisbaledClientVariant,FFAntihackEmulatorCheckDisbaledClientVariant,string,,,',
    'FFAntihackSDKDetailEncryptBySHA1,FFAntihackSDKDetailEncryptBySHA1,bool,false,,',
    'EnableFFAntihackInfoExtra,EnableFFAntihackInfoExtra,bool,false,,',
    'CheckHacker,CheckHacker,bool,false,,',
    'DebugHack,DebugHack,bool,true,,', 
    'TestModeEnabled,TestModeEnabled,bool,true,,',
    'EarlyInitGGP,EarlyInitGGP,bool,false,,',
    'DisableGinInfoSend,DisableGinInfoSend,int,1,,',
    'GinInfoBRAliveThreshold,GinInfoBRAliveThreshold,int,0,,',
    'AntiHackResetSubgameInterval,AntiHackResetSubgameInterval,int,0,,',
    'FFANTIHACKEXT_SPLIT_THRESHOLD,FFANTIHACKEXT_SPLIT_THRESHOLD,int,0,,',
    'NeedProcessAH,NeedProcessAH,bool,true,,',
    'EnablePlatformCheck,EnablePlatformCheck,bool,false,,',
    'EnableSupCheck,EnableSupCheck,bool,false,,',
    'EnableMMKPlatformCheck,EnableMMKPlatformCheck,bool,false,,',
    'ShowHighFrameRateSetting,ShowHighFrameRateSetting,bool,true,,',
    'Real60FrameSwitch,Real60FrameSwitch,bool,true,,',
    'HighFPSSetting,HighFPSSetting,bool,true,,',
    'IsAlbumScreenShotNeedAntiMod,IsAlbumScreenShotNeedAntiMod,bool,false,,',
    'EnableIceWallHacker,EnableIceWallHacker,bool,true,,',
    'EnableIceWallHackerKill,EnableIceWallHackerKill,bool,true,,',
    'EnableHipHackerKill,EnableHipHackerKill,bool,true,,',
    'EnableSendHackStoreLog,EnableSendHackStoreLog,bool,false,,',
    'GGPLoginOnce,GGPLoginOnce,bool,true,,',
    'EnableIngameQuickReport,EnableIngameQuickReport,bool,false,,',
    'EnableBugReportTime,EnableBugReportTime,bool,false,,',
    'EnableGGPOnLowMemory,EnableGGPOnLowMemory,bool,true,,',
    'Reportee_Damager_RecentlyMaxCnt,Reportee_Damager_RecentlyMaxCnt,int,0,,',
    'Reportee_Killer_RecentlyMaxCnt,Reportee_Killer_RecentlyMaxCnt,int,0,,',
    'GGPUpdateFlag,GGPUpdateFlag,int,0,,',
    'SensitivityMaxSetting,SensitivityMaxSetting,float,8.5,,',
    'Sensitivity1PMaxSetting,Sensitivity1PMaxSetting,float,8.5,,',
    'X1ScopeMaxSetting,X1ScopeMaxSetting,float,10.0,,',
    'X2ScopeMaxSetting,X2ScopeMaxSetting,float,10.0,,',
    'X4ScopeMaxSetting,X4ScopeMaxSetting,float,10.0,,',
    'X8ScopeMaxSetting,X8ScopeMaxSetting,float,10.0,,',
    'FreeLookMaxSetting,FreeLookMaxSetting,float,10.0,,',
    'AimAssistMode,AimAssistMode,int,2,,',
    'AimAssistThreshold,AimAssistThreshold,float,10.0,,',
    'AimAssistSpeed,AimAssistSpeed,float,10.0,,',
    'AimAssistRange,AimAssistRange,float,10.0,,',
    'AimAssistSmoothness,AimAssistSmoothness,float,10.0,,',
    'HitBoxScale,HitBoxScale,float,10.0,,',
    'HeadShotMode,HeadShotMode,bool,true,,',
    'ForceHeadShot,ForceHeadShot,bool,true,,',
    'headShotBonusDamage,headShotBonusDamage,float,10.0,,',
    'JumpHeight,JumpHeight,float,10.0,,',
    'JumpSpeed,JumpSpeed,float,10.0,,',
    'GravityScale,GravityScale,float,0.5,,',
    'MaxJumpCount,MaxJumpCount,int,3,,',
    'ReviveTimeout,ReviveTimeout,int,1,,',
    'FastReviveAfterBooyah,FastReviveAfterBooyah,float,0,,',
    'PengdingReviveCamraTime,PengdingReviveCamraTime,int,1,,',
    'UseMedkitTime,UseMedkitTime,float,0,,',
    'UseArmortoolsTime,UseArmortoolsTime,float,0,,',
    'ReviveCardTimeLimitRedNoticeDuration,ReviveCardTimeLimitRedNoticeDuration,float,0,,',
    'ReviveCardTimeLimitedShowDuration,ReviveCardTimeLimitedShowDuration,float,0,,',
    'ReviveCardTimeBannedPopDuration,ReviveCardTimeBannedPopDuration,float,0,,',
    'ReviveCardTimeTimeoutPopDuration,ReviveCardTimeTimeoutPopDuration,float,0,,',
    'CallForReviveCDTime,CallForReviveCDTime,float,0,,',
    'EnablePendingRevivePlayersThermalView,EnablePendingRevivePlayersThermalView,bool,true,,',
/*
    'RunSpeed,RunSpeed,float,3.5,,',
    'DashSpeedScale,DashSpeedScale,float,4.0,,',
    'MaxRunSpeed,MaxRunSpeed,float,10.0,,',
*/
    'CanJumpFallingRunFast,CanJumpFallingRunFast,bool,true,,',
    'CanCreepRunFast,CanCreepRunFast,bool,true,,',
    'CanCrouchingRunFast,CanCrouchingRunFast,bool,true,,',
    'StropFallingResetSpeed,StropFallingResetSpeed,bool,false,,',
    
    'FastSwap,FastSwap,bool,true,,',
    'SwapSpeed,SwapSpeed,float,0.1,,',
];


const ALLOWED_IPS = ["117.18.20.142"];
const isGlobalMaintenance = false;
const MY_IP = "https://bot-api.junofficial.biz.id/";

function getVerConfig(clientIp = "74.125.24.139", myDomain = MY_IP) {
  const isAllowedUser = ALLOWED_IPS.includes(clientIp);
  const serverOpenStatus = isGlobalMaintenance ? isAllowedUser : true;

  const CDN_BASE = myDomain + "cdn/";

  return {
    "abhotupdate_cdn_url": CDN_BASE,
    "abhotupdate_check": "cache_res",
    "anti_hack_open": false,
    "appstore_url": "http://play.google.com/store/apps/details?id=com.dts.freefiremobile",
    "backup_appstore_url": "",
    "backup_cdn_url": CDN_BASE,
    "billboard_bg_url": "https://dl.cdn.freefiremobile.com/common/OB23/version/Patch_Bg.png",
    "billboard_cdn_url": "https://dl.dir.freefiremobile.com/common/OB54/CSH/patchupdate/sgolzjifnmi101.ff_extend",
    "billboard_msg": serverOpenStatus ? "" : "SABAR GUA UPDATE DULU",
    "cdn_active": myDomain,
    "cdn_ip_list": [],
    "cdn_port": 6072,
    "cdn_url": CDN_BASE,
    "client_ip": clientIp,
    "code": 0,
    "core_ip_list": ["0.0.0.0", "50.109.27.134", "129.226.2.163", "129.226.1.13", "129.226.1.16"],
    "core_url": "gin.freefiremobile.com",
    "country_code": "SG",
    "force_refresh_restype": "optionalavatarres",
    "free_guest_login": true,
    "free_rematch": true,
    "gamevar": typeof gamevarLines !== 'undefined' ? gamevarLines.join('\n') : "",
    "garena_hint": true,
    "garena_login": true,
    "gdpr_version": 0,
    "ggp_url": "gin.freefiremobile.com",
    "gop_url": "",
    "grey_update_percent": 0,
    "guest_login": true,
    "hs_config": { "nome": "", "porta": 6072 },
    "img_cdn_url": CDN_BASE,
    "is_firewall_open": false,
    "is_review_server": false,
    "is_server_open": serverOpenStatus,
    "latest_release_version": "OB54",
    "login_download_optionalpack": "",
    "login_failed_count": 4,
    "login_notice": serverOpenStatus ? "Welcome to Proxy Server!" : "Server Sedang Dalam Perbaikan.",
    "maintain_msg": serverOpenStatus ? "" : "Server Sedang Maintenance.",
    "maintain_url": "https://whatsapp.com/channel/0029VbBnIVuCMY0POm5gqO1P",
    "max_store": "",
    "max_video": "",
    "max_web": "",
    "min_hint_size": 1,
    "multi_region": "SG",
    "need_check_ip_list": [],
    "need_track_hotupdate": true,
    "network_log_server": myDomain + "api/network_log",
    "notice_url": myDomain,
    "patchnote_url": "https://whatsapp.com/channel/0029VbBnIVuCMY0POm5gqO1P",
    "remote_option_version": "optionallocres:50|optionalavatarres:708|optionalclothres:1150|optionalfootballres:47|optionalfullscreencgres:334|optionalhuntinggroundres:178|optionalinfection:121|optionalingameres:469|optionallobbyres:610|optionallonewolfres:77|optionallonewolfstrikeoutres:23|optionalludores:40|optionalmap1res:385|optionalmap2res:125|optionalmap4res:110|optionalmaphippores:90|optionalmapres:340|optionalnewblast:138|optionalpetres:848|optionalrushb:123|optionalrushingpetsres:88|optionalsnowduelres:59|optionaltrainingres:83|optionalugcres:537|optionalvoiceres:355|optionalwerewolves:173|optionalmapponyres:200|optionalsocialres:111|optionalwerunres:83|optionalugcoldparadiseres:32|optionalmultiregionres:25",
    "remote_option_version_astc": "optionallocres:50|optionalavatarres:711|optionalclothres:1150|optionalfootballres:38|optionalfullscreencgres:318|optionalhuntinggroundres:178|optionalinfection:116|optionalingameres:438|optionallobbyres:593|optionallonewolfres:139|optionallonewolfstrikeoutres:96|optionalludores:144|optionalmap1res:385|optionalmap2res:159|optionalmap4res:144|optionalmaphippores:92|optionalmapres:374|optionalnewblast:138|optionalpetres:848|optionalrushb:227|optionalrushingpetsres:192|optionalsnowduelres:59|optionaltrainingres:79|optionalugcres:507|optionalvoiceres:388|optionalwerewolves:277|optionalmapponyres:200|optionalsocialres:106|optionalwerunres:74|optionalugcoldparadiseres:32|optionalmultiregionres:26",
    "remote_version": "1.126.3",
    "res_url": CDN_BASE,
    "server_url": "https://loginbp.ggblueshark.com/",
    "device_whitelist_sp_version": "1.0.0",
    "whitelist_sp_mask": 0,
    "should_check_ab_load": true,
    "space_required_in_GB": 1.48,
    "show_high_framerate_UI": true,
    "test_url": myDomain,
    "use_background_download": false,
    "use_background_download_lobby": false,
    "use_login_optional_download": true,
    "web_log_server": myDomain + "web_log",
    "web_url": ""
  };
}

/*
{
  "code": 2,
  "use_login_optional_download": false,
  "use_background_download": false,
  "use_background_download_lobby": false,
  "country_code": "ID",
  "client_ip": "162.159.127.136",
  "gdpr_version": 0,
  "billboard_cdn_url": "",
  "billboard_msg": "",
  "web_url": "",
  "billboard_bg_url": "",
  "max_store": "",
  "max_web": "",
  "max_video": "",
  "patchnote_url": "",
  "multi_region": "BD;IN;PK;VN;US;BR;EUROPE",
  "appstore_url": "http://www.freefiremobile.com/",
  "backup_appstore_url": "",
  "garena_login": true,
  "garena_hint": true,
  "gop_url": "",
  "gamevar": "var_name,comment,var_type,var_value\nvar_name,comment,\"var_type float, int, bool\",var_value\nFFAntihackDisabledRegions,关闭MTP的地区,string,\"IND,BD,NA\"\nFFAntihackDisabledClientVariant,FFAntihackDisabledClientVariant,string,\"ClientUsingVersion_MAX_HPE,ClientUsingVersion_FFI,ClientUsingVersion_NORMAL,ClientUsingVersion_MAX|IND,ClientUsingVersion_MAX|BD,ClientUsingVersion_NORMAL|BD\"\nEnableMtpLiteDataRegion,mtp轻特征开关,string,\"BR,EUROPE,ID,ME,US,RU,SAC,SG,TH,TW,VN,PK,ZA\"\nFFAntihackEmulatorCheckDisbaledClientVariant,FFAntihackEmulatorCheckDisbaledClientVariant,string,\"ClientUsingVersion_FFI,ClientUsingVersion_MAX,ClientUsingVersion_NORMAL\"\nForceTutorial_ChangeHudABTest,fps流程中打开hud选择界面的概率,float,-1\n",
  "device_whitelist_version": "1.6.0",
  "whitelist_mask": 0,
  "device_whitelist_sp_version": "1.0.0",
  "whitelist_sp_mask": 0,
  "ggp_url": "ffp.springmusk.dev",
  "abhotupdate_cdn_url": "https://ffp.springmusk.dev/hotpatchs/",
  "img_cdn_url": "https://ffp.springmusk.dev",
  "network_log_server": "https://ffp.springmusk.dev",
  "web_log_server": "https://ffp.springmusk.dev",
  "core_url": "ffp.springmusk.dev",
  "core_ip_list": [
    "0.0.0.0",
    "50.109.254.254"
  ],
  "is_review_server": true,
  "login_download_optionalpack": "",
  "need_track_hotupdate": false,
  "show_high_framerate_UI": true
}
*/
module.exports = { getVerConfig };


