feat: add build restproxy to the input

This commit is contained in:
zhangsz
2025-03-06 20:11:02 +08:00
parent e6b570488c
commit e9c7f4fa2c
16 changed files with 379 additions and 17 deletions

10
pkg/cproxy/DEBIAN/control Executable file
View File

@@ -0,0 +1,10 @@
Package: restproxy
Version: 2403.1-YYYYMMDD
Section: net
Priority: optional
Architecture: amd64
Essential: no
Depends:
Conflicts: restproxy
Maintainer: 4GC
Description: 4GC REST Proxy Software

7
pkg/cproxy/DEBIAN/postinst Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
test ! -f /usr/local/restproxy/conf/rest_proxy.conf && cp -rf /usr/local/restproxy/conf/default/* /usr/local/restproxy/conf
systemctl enable restproxy
exit 0

6
pkg/cproxy/DEBIAN/prerm Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
# Commands to be run before uninstall of the package
systemctl disable restproxy

View File

@@ -0,0 +1,26 @@
[db0]
enable=on
role=master
host_ip=192.168.1.211
host_port=3306
db_name=boss
client_name=root
client_pwd=123456
[db1]
enable=on
role=slave
host_ip=192.168.1.211
host_port=3306
db_name=boss
client_name=root
client_pwd=123456
[db2]
enable=on
role=slave
host_ip=192.168.1.211
host_port=3306
db_name=boss
client_name=root
client_pwd=123456

View File

@@ -0,0 +1 @@
20

View File

@@ -0,0 +1,43 @@
[server]
local_ip=192.168.1.229
local_port=4901
pstn_ip=192.168.1.231
pstn_port=22
user_name=altouser
password=a1t0U53r
[MSAN-0]
ip=10.10.1.214
port=23
user_name=manager
password=ntms@n
[MSAN-1]
ip=10.10.1.215
port=23
user_name=manager
password=ntms@n
[Pairs-Slot]
#PairGrou,MASN,Slot
0,1,1
1,1,2
2,1,3
3,1,4
4,1,5
5,1,6
6,1,7
7,1,8
8,1,9
9,1,10
10,1,14
11,1,15
12,2,1
13,2,2
14,2,3
15,2,4
16,2,5
17,2,6
18,2,7
19,2,8
20,2,9
21,2,10
22,2,14
23,2,15

22
pkg/cproxy/conf/rest_proxy.conf Executable file
View File

@@ -0,0 +1,22 @@
#rest proxy local ip and port as server
localIPPort=10.60.1.152:4951
#restfull query ip&port
queryIPPort=10.60.1.38:8080
#restfull vourcher recharge ip&port
rechargeIPPort=10.60.1.37:9000
#user/passwrd
username=external
password=password
subsystem=Selfcare
customerIP=10.60.1.37
url_walletbalance=/rest-services/%s/xxx
url_rechargevoucher=/rest-services/%s/yyy
#test MSISDN
test_msisdn=6924546778
#test_msisdn=77922417981167
test_pin=63555825498329
log=./log/log

View File

@@ -0,0 +1,39 @@
udp_localIPPort=192.168.1.229:4900
udp_ocsIPPort=192.168.1.229:4951
http_localPort=8080
#authcode url
authcode_url=/authcode
#query_userdata url
query_userdata_url=/query_userdata
#bundle_subs url
bundle_subs_url=/bundle_subs
#bundle_usage url
bundle_usage_url=/bundle_usage
#recharge url
recharge_url=/recharge
#transfer url
transfer_url=/transfer
#recharge_card url
recharge_card_url=/recharge_card
#check_balance url
check_balance_url=/check_balance
#query_balane url
query_balane_url=/query_balane
#open acount url
create_account_url=/openPackage
#update acount url
update_subs_url=/updateSubs
#delete acount url
delete_subs_url=/deleteSubs
#errcodes and their meanings
errcode_map_message=[2001,success]
errcode_map_message=[3001,command unsupported]
errcode_map_message=[3010,unknown peer]
errcode_map_message=[4001,invalid user status]
errcode_map_message=[4008,dest user not allowed]
errcode_map_message=[4012,credit limit]
errcode_map_message=[5004,invalid parameter value]
errcode_map_message=[5005,missing parameter]
errcode_map_message=[5006,invalid recharge password]
errcode_map_message=[5012,unable to comply]
errcode_map_message=[5030,user unknown]

View File

@@ -0,0 +1,15 @@
[EMS]
ems0_ip=192.168.1.141
ems0_port=4999
user_name=manager
password=manager
connect_hss=connect hlr -srvip 192.168.1.219 -passwd 123456
connect_auc=connect auc -srvip 192.168.1.219 -passwd 123456
[HSS]
[AUC]
[VMS]
[Provision]
enable

View File

@@ -0,0 +1,11 @@
[Service]
Type=idle
WorkingDirectory=/usr/local/restproxy
ExecStart=/usr/local/restproxy/restproxy -r 1 > /dev/null 2>&1 &
Restart=always
RestartSec=3
StandardOutput=null
[Install]
WantedBy=multi-user.target