Feature Embedded proxy in your server.

kor

PHP ziom
Premium User
Joined
Jul 12, 2008
Messages
86
Reaction score
53
Location
Bialystok, Poland
Probably you put stream in wrong place of /etc/nginx/nginx.conf file (as your error is at line 16). You have to put it below closing tag of http like this:
Code:
stream {
        server {
                listen 7172;
                proxy_pass YOUR_SERVER_IP:7172;
        }
}
 

theduck

Member
Joined
Dec 6, 2018
Messages
42
Reaction score
6
protocollogin.cpp:70:40: error: ‘account’ was not declared in this scope
auto proxyInfo = g_config.getProxyInfo(account.proxyId);
^~~~~~~
CMakeFiles/tfs.dir/build.make:1451: recipe for target 'CMakeFiles/tfs.dir/src/protocollogin.cpp.o' failed
make[2]: *** [CMakeFiles/tfs.dir/src/protocollogin.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tfs.dir/all' failed
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2



Code:
auto proxyInfo = g_config.getProxyInfo(account.proxyId);
    if (proxyInfo.first) {
        std::ostringstream ss;
        ss << g_config.getString(ConfigManager::SERVER_NAME) << " - " << proxyInfo.second.name;
        output->addString(ss.str());
        output->addString(proxyInfo.second.ip);
        output->add<uint16_t>(proxyInfo.second.port);
    } else {
        output->addString(g_config.getString(ConfigManager::SERVER_NAME));
        output->addString(g_config.getString(ConfigManager::IP));
        output->add<uint16_t>(g_config.getNumber(ConfigManager::GAME_PORT));
    }

    
    
    
    if (isLiveCastLogin) {
        output->add<uint16_t>(g_config.getNumber(ConfigManager::LIVE_CAST_PORT));
    } else {
        output->add<uint16_t>(g_config.getNumber(ConfigManager::GAME_PORT));
    }
    output->addByte(0);
}
 

theduck

Member
Joined
Dec 6, 2018
Messages
42
Reaction score
6
How about this proxyList.patch (https://gist.github.com/Mkalo/a3b419f092ab394d7d226308f066ae5e#file-proxylist-patch-L23) ?

And it's not possible that you have error protocollogin.cpp:70:40: error: ‘account’ was not declared in this scope if account is defined here otland/forgottenserver (https://github.com/otland/forgottenserver/blob/master/src/protocollogin.cpp#L48)
Code:
struct Account {
    std::vector<std::string> characters;
    std::string name;
    std::string key;
    time_t lastDay = 0;
    uint32_t id = 0;
    uint16_t premiumDays = 0;
    uint32_t coinBalance = 0;
    AccountType_t accountType = ACCOUNT_TYPE_NORMAL;
    uint16_t proxyId = 0;
I did the same ...
 
Top