Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

TERA API (node.js), Shop and Launcher with Client Patcher

Newbie Spellweaver
Joined
Nov 16, 2018
Messages
83
Reaction score
7
If you run it with en, the Terra Shop will open, but if you run it with ko, nothing happens when you press the Terra Shop button.

What should I do?

For reference, I am using Ver 100.02. (VM)


error messege : (info) Portal API: GET /tera/ShopPartiaError
 
Last edited:
TERA Foundation
Joined
Jun 3, 2020
Messages
489
Reaction score
787
If you run it with en, the Terra Shop will open, but if you run it with ko, nothing happens when you press the Terra Shop button.

What should I do?

For reference, I am using Ver 100.02. (VM)


error messege : (info) Portal API: GET /tera/ShopPartiaError

Korean language is not available for the Launcher and Tera Shop. You need to do the translation yourself. Read the section "How to add new language translation (new region of client)" here: https://forum.ragezone.com/f797/tera-api-node-js-and-1205579/. Also note that for Korean you need to use the "kr" instead of "ko".
 
Newbie Spellweaver
Joined
Nov 16, 2018
Messages
83
Reaction score
7
Korean language is not available for the Launcher and Tera Shop. You need to do the translation yourself. Read the section "How to add new language translation (new region of client)" here: https://forum.ragezone.com/f797/tera-api-node-js-and-1205579/. Also note that for Korean you need to use the "kr" instead of "ko".

After setting up local Korea, both Korean voice and text work well.

But if you press the Terra Shop button, there is no response.

Should I add more?


hsdn - TERA API (node.js), Shop and Launcher with Client Patcher - RaGEZONE Forums


No response after clicking.

When run in English or Russian, Terra Shop opens normally.
 
Last edited:
TERA Foundation
Joined
Jun 3, 2020
Messages
489
Reaction score
787
@doogydog Most likely, the Shop function is disabled for this language.
I think this is a problem of the tera client or DC. But this is not an API problem.
 
Newbie Spellweaver
Joined
Nov 20, 2020
Messages
37
Reaction score
1
do we need to restart server after edit via web server admin control ? and reset only worldserver or everything ?
 
Newbie Spellweaver
Joined
Nov 16, 2018
Messages
83
Reaction score
7
@doogydog Most likely, the Shop function is disabled for this language.
I think this is a problem of the tera client or DC. But this is not an API problem.

Thank you for answer.
In the end, the Terra Shop button cannot be activated in other regions (Korea).
One more question.How to add a new promotion?
 
Newbie Spellweaver
Joined
Sep 18, 2022
Messages
5
Reaction score
1
Read the section "How to add new language translation (new region of client)" here: https://forum.ragezone.com/f797/tera-api-node-js-and-1205579/. Also note that for Korean you need to use the "kr" instead of "ko".

I did exactly as described, but when I set the client to french, I have no servers to chose.



Edit: Same for german.

What I am missing?
Thank you.

Edit: Figured it out myself, is working now.
 
Last edited:
Newbie Spellweaver
Joined
Jun 9, 2022
Messages
25
Reaction score
0
Hello. I've encountered a bizzare issue, the launcher gets stuck infinitely patching the client but i used the same way i always did. Can someone give me some tips, please?

ty
 
Newbie Spellweaver
Joined
Sep 23, 2022
Messages
8
Reaction score
4
I solved that problem following the indications of hsdn:
[h=4]Files and folders that must be removed from clientDirectory before packing:[/h]
  • $Patch
  • \Binaries\cookies.dat
  • \S1Game\GuildFlagUpload
  • \S1Game\GuildLogoUpload
  • \S1Game\ImageCache
  • \S1Game\Logs
  • \S1Game\Screenshots
  • \S1Game\Config\S1Engine.ini
  • \S1Game\Config\S1Game.ini
  • \S1Game\Config\S1Input.ini
  • \S1Game\Config\S1Lightmass.ini
  • \S1Game\Config\S1Option.ini
  • \S1Game\Config\S1SystemSettings.ini
  • \S1Game\Config\S1TBASettings.ini
  • \S1Game\Config\S1UI.ini
  • \Launcher.exe
  • \local.db
  • \version.ini

    you will have to repack everything again from 0
 
Initiate Mage
Joined
Jan 2, 2023
Messages
1
Reaction score
0
Hi,
I am experiencing a very weird issue.
The AdminTool webpage works perfectly only one thing: where it shows the user data.
(e.g. 127.0.0.1:88/users/default.aspx?ServerNo=1&UserDBId=31)
I did not find a reason why certain characters are throwing the attached error message and why some are completely fine :(

It even happened that for one char (ID 1034) the page was working fine and I changed some stats without any issue. Then started to add some items which went well as well for like 5or 6 items then suddenly the same error came for this user out of the blue.
Or for example a character (ID 1031) was not working since its creation.
All of these character (1031 or 1034) are working fine in the game as the users reports and they can use the game fully. Only I cannot alter their stats (or help with resetting quest lines) due to the error message attached.

Any idea how to fix it or what went wrong for these characters?
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Jan 14, 2023
Messages
5
Reaction score
6
I've been trying to optimize my server and one way was to move the mysql (and the api) off my server to a different host, so I've created a dockerfile for the tera-api to run it as a docker container. I haven't gotten to BOX or STEER yet, unfortunately, but this is a good starting point.

Copy tera-api folder somewhere, make a Dockerfile in the dir

Dockerfile:
Code:
FROM node:19

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json
./RUN npm install
COPY . .
EXPOSE 81
EXPOSE 8050
EXPOSE 8040
EXPOSE 8080
CMD [ "node", "--max_old_space_size=4096", "src/app.js" ]

Build it locally:
Code:
docker build . -t tera-api

And to run it (you may need to change ports)
Code:
docker run -p 8050:8050 -p 8049:81 -p 8080:8080 -p 8040:8040 tera-api
 
Newbie Spellweaver
Joined
Dec 21, 2022
Messages
7
Reaction score
0
getting error 274 when using https for launcher.
any idea why?
is accessible in browser
is also accessible in browser

using port works.
But I got a reverse proxy setup so is pointed to teragamehost:81 and can deliver traffic over https. cert is from lets encrypt.
 
Newbie Spellweaver
Joined
Jan 14, 2023
Messages
5
Reaction score
6
getting error 274 when using https for launcher.
any idea why?
is accessible in browser
is also accessible in browser

using port works.
But I got a reverse proxy setup so is pointed to teragamehost:81 and can deliver traffic over https. cert is from lets encrypt.

I never got an error 274 but I lose transparency when I do the launcher over HTTPS so I just use HTTP for the launcher. I use caddy, here's my config below. I host the client and launcher files on my web server and proxy everything else to 81 on my API host.

Code:
tera.domain.net http://tera.domain.net {

handle_path /public/* {
    root * /data/tera/
    file_server
} 
handle_path /launcher/* {
    root * /data/tera/launcher/
    file_server
}
handle {
    reverse_proxy 10.10.10.128:81
}
}
 
TERA Foundation
Joined
Jun 3, 2020
Messages
489
Reaction score
787
@Incedius You can try nginx with this config:
Code:
server {
	server_name test.ml;
	listen 10.64.16.238:80;

	location / {
		try_files /does_not_exists @api;
	}

	location @api {
		proxy_buffering off;
		proxy_pass http://10.64.16.109:81;
		proxy_redirect http://10.64.16.109:81 /;
		proxy_set_header Host $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Real-IP $remote_addr;
		access_log off;
	}
}
 
Newbie Spellweaver
Joined
Dec 21, 2022
Messages
7
Reaction score
0
I never got an error 274 but I lose transparency when I do the launcher over HTTPS so I just use HTTP for the launcher. I use caddy, here's my config below. I host the client and launcher files on my web server and proxy everything else to 81 on my API host.

Code:
tera.domain.net http://tera.domain.net {

handle_path /public/* {
    root * /data/tera/
    file_server
}
handle_path /launcher/* {
    root * /data/tera/launcher/
    file_server
}
handle {
    reverse_proxy 10.10.10.128:81
}
}

I'm using this setup as well but with nginx. My intention is to use SSL for the login as well as for tera shop so having connections to 81 isn't ideal.

@Incedius You can try nginx with this config:
Code:
server {
    server_name test.ml;
    listen 10.64.16.238:80;

    location / {
        try_files /does_not_exists @api;
    }

    location @api {
        proxy_buffering off;
        proxy_pass http://10.64.16.109:81;
        proxy_redirect http://10.64.16.109:81 /;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        access_log off;
    }
}

this is similar to my setup but i'm trying to listen on port 443 with a valid cert from letsencrypt
what does error 274(11) mean anyway?
 
Newbie Spellweaver
Joined
Jan 14, 2023
Messages
5
Reaction score
6
I'm using this setup as well but with nginx. My intention is to use SSL for the login as well as for tera shop so having connections to 81 isn't ideal.

Caddy is doing exactly what nginx does. I don't understand what you're saying isn't ideal? Port 81 is what the API is listening on and the reverse proxy accepts an HTTPS connection and proxies the connection to port 81 on the API host. It's HTTPS to the client and HTTP to the API, it's completely transparent just like nginx..

With my caddy config the shop
Code:
/tera/ShopAuth?authKey=%s
is proxied to the API host because only /public/* and /launcher/* (patches, images, css, etc) are all provided by Caddy directly.
 
Newbie Spellweaver
Joined
Dec 21, 2022
Messages
7
Reaction score
0
Caddy is doing exactly what nginx does. I don't understand what you're saying isn't ideal? Port 81 is what the API is listening on and the reverse proxy accepts an HTTPS connection and proxies the connection to port 81 on the API host. It's HTTPS to the client and HTTP to the API, it's completely transparent just like nginx..

With my caddy config the shop
Code:
/tera/ShopAuth?authKey=%s
is proxied to the API host because only /public/* and /launcher/* (patches, images, css, etc) are all provided by Caddy directly.

My bad I misunderstood what you mean when you said that you use http for launcher and then proxying everything else to 81.
So you were able to get the launcher to load with caddy as the reverse proxy on your webserver proxying to the api server's port 81.
I'll give caddy a try then.

Edit:
After some more digging I found that the launcher is somehow trying to load /public/patch/launcher_info.ini and /public/patch/version.ini using http and since I have all http requests redirected to https it's giving me the 274(11) error.

This behavior is only observed when I use https. if I use , launcher uses portnumber for all requests. (bug?)

Once I added the /public/patch/* path to port 80 error disappeared and launcher is loading.

No transparency like you mentioned but it's a tradeoff I'm willing to make if it means a more secure login
 
Last edited:
TERA Foundation
Joined
Jun 3, 2020
Messages
489
Reaction score
787
Tera API has been updated

Changes:
  • Added Gateway API method GetAccountBanByUserNo.
  • Fixed variables names and translation.
  • Fixed edit password in Admin Panel when sha512 enabled.
  • Switch from isAlphanumeric to isStrongPassword and increase password max length to 128.
Installation:
  1. Download and replace all files of the tera-api\src directory with new ones.
  2. Restart Tera API.
 
Last edited:
TERA Foundation
Joined
Jun 3, 2020
Messages
489
Reaction score
787
Tera API has been updated

Changes:
  • Added new config parameter API_ARBITER_USE_IP_FROM_LAUNCHER.
  • Fixed security issue with request IP spoofing (X-Forwarded-For header).
  • Removed fonts from repository (must now be downloaded separately).
The new parameter API_ARBITER_USE_IP_FROM_LAUNCHER allows you to solve the problem with determining the client IP address (for the Admin Panel logs and IP bans) when using Tera Server Proxy. When this parameter is set as true, the client IP address will be used as the login IP address of the Launcher. When using the Launcher (Portal API) behind a proxy like nginx or Cloudflare, set parameter LOG_IP_ADDRESSES_FORWARDED_FOR as true.

Installation:
  1. Download and replace all files of the tera-api\src directory with new ones.
  2. If necessary, add parameter API_ARBITER_USE_IP_FROM_LAUNCHER to your .env file.
  3. Restart Tera API.
 
Last edited:
Back
Top