自動登入 Epic Games Store 並尋找可用的免費遊戲。向您發送預先填充的結帳鏈接,以便您可以在登入後完成結帳。
該工具可以使用 JSON 和環境變數的組合進行設定。設定檔支援 JSON5 語法(註解、尾隨逗號等)。對於每個屬性,JSON 配置值優先於對應的環境變數值。
有關每個選項、其預設值和環境變數鍵的詳細信息,請參閱配置文件網站。
設定檔儲存在掛載的/usr/app/config
區中,可以命名為config.json
或config.json5
。
config.json
或config.json5
{
"runOnStartup" : true ,
"cronSchedule" : "0 0,6,12,18 * * *" ,
"logLevel" : "info" ,
"webPortalConfig" : {
"baseUrl" : "https://epic.example.com" ,
} ,
"accounts" : [
{
"email" : "[email protected]" ,
} ,
] ,
"notifiers" : [
// You may configure as many of any notifier as needed
// Here are some examples of each type
{
"type" : "email" ,
"smtpHost" : "smtp.gmail.com" ,
"smtpPort" : 587 ,
"emailSenderAddress" : "[email protected]" ,
"emailSenderName" : "Epic Games Captchas" ,
"emailRecipientAddress" : "[email protected]" ,
"secure" : false ,
"auth" : {
"user" : "[email protected]" ,
"pass" : "abc123" ,
} ,
} ,
{
"type" : "discord" ,
"webhookUrl" : "https://discord.com/api/webhooks/123456789123456789/A-abcdefghijklmn-abcdefghijklmnopqrst12345678-abcdefghijklmnop123456" ,
// Optional list of users or roles to mention
"mentionedUsers" : [ "914360712086843432" ] ,
"mentionedRoles" : [ "734548250895319070" ] ,
} ,
{
"type" : "telegram" ,
// Optional Custom TELEGRAM server URL
"apiUrl" : "https://api.telegram.org" ,
"token" : "644739147:AAGMPo-Jz3mKRnHRTnrPEDi7jUF1vqNOD5k" ,
"chatId" : "-987654321" ,
} ,
{
"type" : "apprise" ,
"apiUrl" : "http://192.168.1.2:8000" ,
"urls" : "mailto://user:[email protected]" ,
} ,
{
"type" : "pushover" ,
"token" : "a172fyyl9gw99p2xi16tq8hnib48p2" ,
"userKey" : "uvgidym7l5ggpwu2r8i1oy6diaapll" ,
} ,
{
"type" : "gotify" ,
"apiUrl" : "https://gotify.net" ,
"token" : "SnL-wAvmfo_QT" ,
} ,
{
"type" : "homeassistant" ,
"instance" : "https://homeassistant.example.com" ,
"token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" ,
"notifyservice" : "mobile_app_smartphone_name" ,
} ,
{
"type" : "bark" ,
// your bark key
"key" : "xxxxxxxxxxxxxxxxxxxxxx" ,
// bark title, optional, default: 'epicgames-freegames'
"title" : "epicgames-freegames" ,
// bark group, optional, default: 'epicgames-freegames'
"group" : "epicgames-freegames" ,
// bark private service address, optional, default: 'https://api.day.app'
"apiUrl" : "https://api.day.app"
} ,
{
"type" : "ntfy" ,
"webhookUrl" : "https://ntfy.example.com/mytopic" ,
"priority" : "urgent" ,
"token" : "tk_mytoken"
} ,
{
"type" : "webhook" ,
//url of your webhook server
"url" : "https://webhook.site/my_uuid" ,
//Optional headers
"headers" : {
"Authentication" : "Bearer 123456"
}
} ,
] ,
}
該項目有時會要求您透過裝置代碼身份驗證登入。 Epic Games 的裝置程式碼會話將在 10 分鐘後過期,因此該專案使用 Web 伺服器和重定向來防止每 10 分鐘向您發送一個新連結。運行 Web 伺服器有兩個選項:
如果您熟悉託管 Web 伺服器和/或反向代理,請依照下列步驟操作:
-p 81:3000
將主機的連接埠 81 對應到容器的連接埠 3000)webPortalConfig.baseUrl
如果您無法在網路上移植正向/反向代理,您仍然可以透過設定遠端存取 Web 伺服器:
{
"webPortalConfig" : {
"localtunnel" : true ,
} ,
}
在你的config.json
中。
每種通知方法都有獨特的設定說明。請閱讀配置網站上的文件(通知方法)以取得確切的詳細資訊和說明。範例配置也可能有幫助。
由於可能不總是需要使用者操作,因此可以手動測試通知方法和 Web 伺服器。本質上,您只需要添加:
"testNotifiers" : true ,
到config.json
的根目錄。有關更多詳細信息,請查看配置文件。注意:為了優化備用記憶體使用情況,當進程未運作時,Web 伺服器不會運作。 Web 伺服器僅在排程運行期間可用。
該映像可從 GitHub Container Registry 和 Docker Hub 取得:
ghcr.io/claabs/epicgames-freegames-node:latest
charlocharlie/epicgames-freegames:latest
如果您遇到 Chromium 啟動問題(登入/通知時掛起),您可以嘗試 Debian 映像:
ghcr.io/claabs/epicgames-freegames-node:debian
charlocharlie/epicgames-freegames:debian
如果您使用完整的 JSON 配置,則剩下的唯一 Docker 可設定項目是連接埠和磁碟區。
大多數配置選項可以透過環境變數設定。在配置文件中尋找每個選項鍵的env
標記。
如果您出於某種原因想要更改預設配置目錄或設定檔名, CONFIG_DIR
和CONFIG_FILE_NAME
可以用作環境變數。
主機連接埠 | 貨櫃港口 | 描述 |
---|---|---|
3000 | 3000 | 驗證碼解析頁面所在Web伺服器所在的連接埠映射 |
主辦地點 | 貨櫃位置 | 模式 | 描述 |
---|---|---|---|
/my/host/dir/ | /usr/app/config | rw | 配置和 cookie 檔案的位置 |
建議添加-m 2g
作為docker run
參數以設定最大記憶體使用量為 2GB。 Chromium 進程有時可能會失控,如果沒有限制,您的系統最終可能會鎖定。
$ docker run -d -v /my/host/dir/:/usr/app/config:rw -p 3000:3000 -m 2g ghcr.io/claabs/epicgames-freegames-node:latest
如果沒有 JSON 配置,則只能配置一個帳戶。
$ docker run -d -e TZ=America/Chicago -e [email protected] -e RUN_ON_STARTUP=true -e BASE_URL=https://example.com -e SMTP_HOST=smtp.gmail.com -e SMTP_PORT=587 -e [email protected] -e EMAIL_SENDER_NAME="Epic Games Captchas" -e [email protected] -e SMTP_SECURE=true -e [email protected] -e SMTP_PASSWORD=abc123 -v /my/host/dir/:/usr/app/config:rw -p 3000:3000 -m 2g ghcr.io/claabs/epicgames-freegames-node:latest
如果您在使用裝置代碼驗證登入時遇到問題,您可以匯入臨時會話的 cookie。
https://www.epicgames.com/id
,然後按一下匯出按鈕: ./config
資料夾中,建立<email_address>-cookies.json
(例如[email protected]
),然後貼上您的 cookie。如果您由於某種原因不想使用 Docker 來運行此工具,您可以透過克隆此儲存庫並安裝 Node.js 從原始程式碼運行它。
git clone https://github.com/claabs/epicgames-freegames-node.git
config
資料夾npm i
npm run start
git pull
npm i
在 v5 中,新增或刪除了多個選項。新增/刪除的選項不應影響現有的 v4 配置,但可能需要更改config.json
以獲得穩定的解決方案。
cronSchedule
:預設值變更為每六小時一次。您應該更改 cron 計劃,使其運行頻率超過每 8 小時一次,因為設備代碼身份驗證刷新令牌將在 8 小時後過期。 account.password
:不再使用登入憑證account.totp
:不再使用登入憑證noHumanErrorHelp
:購買不再自動化hcaptchaAccessibilityUrl
:在 v4 中已棄用email
:在 v4 中已棄用,請使用"type": "email"
notifiers
baseUrl
:在 v4 中已棄用,請使用webPortalConfig.baseUrl
onlyWeekly
:在 v4 中已棄用,請使用searchStrategy
感謝 Epigames-weekly-freegames 的靈感。
感謝 EpicResearch 提供的文件使設備代碼身份驗證成為可能。