diff --git a/core/models/pydantic_models/HysteriaData.py b/core/models/pydantic_models/HysteriaData.py index f686bd1..e860c18 100644 --- a/core/models/pydantic_models/HysteriaData.py +++ b/core/models/pydantic_models/HysteriaData.py @@ -15,7 +15,7 @@ class HysteriaData(BaseModel): hysteria2_host: str server_ip: IPv4Address location_country_code: str - location_city_code: int + location_city_code: str operator_id: int # operator_name: str = None operator_domain: str = None diff --git a/core/services/networking/systemwide/encrypted_proxy/configure_singbox.py b/core/services/networking/systemwide/encrypted_proxy/configure_singbox.py index d531a8d..771d051 100644 --- a/core/services/networking/systemwide/encrypted_proxy/configure_singbox.py +++ b/core/services/networking/systemwide/encrypted_proxy/configure_singbox.py @@ -52,6 +52,7 @@ def configure_singbox( ################################### # SEND TO THE API ################################### + logger.info("getting config..") config_results = post_operator_proxy( billing_code=profile.subscription.billing_code, protocol=protocol, @@ -62,6 +63,8 @@ def configure_singbox( if not config_results: return Result(valid=False, error_type=ResultError.INVALID_API_REPLY, message="Server-side API issue.") + print(f"config_results is {config_results}") + ################################### # (SERVER CHOICES) PREP RAW DATA (PYDANTIC MODEL) ################################### diff --git a/core/services/subscriptions/subscriptions_by_protocol.py b/core/services/subscriptions/subscriptions_by_protocol.py index 524a0db..85d7283 100644 --- a/core/services/subscriptions/subscriptions_by_protocol.py +++ b/core/services/subscriptions/subscriptions_by_protocol.py @@ -76,6 +76,9 @@ def create_invoice( payload=submit_data, ) + print(f"api_response is {api_response.valid}") + print(f"api_response is {api_response.error_type}") + # Layer 1: API failure: if not api_response.valid: error_msg = f"API Error: {api_response.error_type} {api_response.message}" @@ -84,7 +87,7 @@ def create_invoice( # Layer 2: Server's Reply: raw_reply = api_response.data - print("validating the server reply.") + print(f"validating the server reply of {raw_reply}.") server_reply = validate_model(ServerReply, raw_reply) if not server_reply: