Tera API (node.js) and Launcher with pacher for patch 92/100

Page 31 of 31 FirstFirst ... 21232425262728293031
Results 451 to 463 of 463
  1. #451
    Apprentice Loliconera is offline
    MemberRank
    Sep 2022 Join Date
    7Posts
    I solved that problem following the indications of @hsdn:
    Files and folders that must be removed from clientDirectory before packing:

    • $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

  2. #452
    Novice gab3c is offline
    MemberRank
    Jan 2023 Join Date
    USLocation
    1Posts
    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?
    Attached Thumbnails Attached Thumbnails capture_error.jpg  
    Last edited by gab3c; 4 Weeks Ago at 08:57 PM. Reason: Original picture was removed by server

  3. #453
    Novice lostsoulfly is offline
    MemberRank
    Jan 2023 Join Date
    3Posts
    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

  4. #454
    Novice Incedius is offline
    MemberRank
    Dec 2022 Join Date
    3Posts
    getting error 274 when using https for launcher.
    any idea why?
    https://somehost/tera/LauncherMain is accessible in browser
    https://somehost/public/launcher/ima...ncher_mask.png is also accessible in browser

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

  5. #455
    Novice lostsoulfly is offline
    MemberRank
    Jan 2023 Join Date
    3Posts
    Quote Originally Posted by Incedius View Post
    getting error 274 when using https for launcher.
    any idea why?
    https://somehost/tera/LauncherMain is accessible in browser
    https://somehost/public/launcher/ima...ncher_mask.png is also accessible in browser

    using port http://teragamehost:81/tera/LauncherMain works.
    But I got a reverse proxy setup so https://somehost 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
    }
    }

  6. #456
    TERA Foundation hsdn is online now
    MemberRank
    Jun 2020 Join Date
    RussiaLocation
    369Posts
    @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;
    	}
    }

  7. #457
    Novice Incedius is offline
    MemberRank
    Dec 2022 Join Date
    3Posts
    Quote Originally Posted by lostsoulfly View Post
    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.

    Quote Originally Posted by hsdn View Post
    @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?

  8. #458
    Novice lostsoulfly is offline
    MemberRank
    Jan 2023 Join Date
    3Posts
    Quote Originally Posted by Incedius View Post
    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.

  9. #459
    Novice Incedius is offline
    MemberRank
    Dec 2022 Join Date
    3Posts
    Quote Originally Posted by lostsoulfly View Post
    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 http://host:portnumber, 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 by Incedius; 2 Weeks Ago at 06:54 AM. Reason: update.

  10. #460
    Apprentice kwg0225 is online now
    MemberRank
    Jan 2023 Join Date
    9Posts
    How do you translate it into Korean?

  11. #461
    TERA Foundation hsdn is online now
    MemberRank
    Jun 2020 Join Date
    RussiaLocation
    369Posts

    !

    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 by hsdn; 1 Week Ago at 05:34 AM.

  12. #462
    TERA Foundation hsdn is online now
    MemberRank
    Jun 2020 Join Date
    RussiaLocation
    369Posts

    !

    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 by hsdn; 1 Week Ago at 05:36 AM.

  13. #463
    Valued Member energyxs is offline
    MemberRank
    Nov 2013 Join Date
    102Posts
    @hsdn

    You can help me out ?

    when i open my Tiktak shop my game crashes



Advertisement