feat(settings): 코어 아웃바운드 HTTP 프록시 설정 추가

접속 IP 를 제한하는 결제사 API 를 로컬·스테이징에서 연동하려면 서버가
내보내는 요청의 출발지 IP 를 바꿔야 한다. 브라우저 프록시로는 바뀌지 않는
축이라 코어 환경설정으로 도입한다.

게이트는 디버그 모드이며 판정은 OutboundProxy 한 곳이 소유한다. 화면의
조건부 렌더링은 편의일 뿐이라 저장 API 직접 호출을 막지 못하므로, 실질
게이트를 판정 지점에 둔다. 주입·적용 지점은 결과만 소비한다.

적용은 Http::globalOptions 전역 옵션이라 확장의 Http:: 호출까지 함께
경유한다. 외부 연동 규약상 curl 핸들을 직접 다뤄야 하는 확장은
OutboundProxy::curlOptions 로 같은 프록시를 탄다 — KG이니시스 본인인증
승인 요청과 CBT 연결 점검을 이 통로로 편입했다. CBT 의 TCP 443 확인은
원시 소켓으로는 프록시를 태울 수 없어 curl CONNECT_ONLY 로 교체했다.

저장 전 연결 테스트는 저장값이 아니라 제출값을 검사하고, 그 프록시를
거쳤을 때 외부에 보이는 IP 를 함께 보고한다. 운영자가 결제사에 등록할
값이라 저장하고 나서 되짚지 않도록 했다. 적용과 같은 조립을 거치므로
확인한 구성과 저장 후 적용되는 구성이 어긋나지 않는다.
This commit is contained in:
HeuJung committed 2026-08-20 17:01:27 +09:00
1 parent 0e8b625436
commit a7b7c64573
55 files changed
+2040 -30

No files matched your search

+11
View File
@@ -913,6 +913,15 @@ return [
'sql_query_log_required' => 'Please select the SQL query log setting.',
'sql_query_log_boolean' => 'SQL query log must be true or false.',
// Outbound HTTP proxy
'outbound_proxy_required' => 'Please enter the outbound proxy address.',
'outbound_proxy_string' => 'The outbound proxy address must be a string.',
'outbound_proxy_max' => 'The outbound proxy address may not be greater than :max characters.',
'outbound_proxy_invalid' => 'The outbound proxy address format is invalid. Supported schemes: :schemes (e.g. socks5h://127.0.0.1:1080)',
'outbound_proxy_bypass_array' => 'The proxy bypass list must be an array.',
'outbound_proxy_bypass_item_string' => 'Each proxy bypass entry must be a string.',
'outbound_proxy_bypass_item_max' => 'Each proxy bypass entry may not be greater than :max characters.',
// List limits
'pagination_result_cap_integer' => 'The total count cap must be a number.',
'pagination_result_cap_min' => 'The total count cap must be at least :min. (0 = unlimited)',
@@ -1307,6 +1316,8 @@ return [
'seo_sitemap_cache_ttl' => 'SEO sitemap cache lifetime',
'debug_mode' => 'debug mode',
'sql_query_log' => 'SQL query log',
'outbound_proxy' => 'outbound proxy address',
'outbound_proxy_bypass' => 'proxy bypass list',
'core_update_github_url' => 'core update GitHub URL',
'core_update_github_token' => 'core update GitHub token',
'geoip_enabled' => 'GeoIP',