Skip to content
Snippets Groups Projects
Commit e92e5bd4 authored by 천 진강's avatar 천 진강
Browse files

feat: 포트포워딩, 옵션 템플릿 작성

parent f06d3bce
No related branches found
No related tags found
3 merge requests!15Feat/certificate,!7Feat/forwarding 포트포워딩 CRUD,!6Feat/forwarding 포트포워딩 CRUD
package com.aolda.itda.template;
import org.springframework.stereotype.Component;
@Component
public class ForwardingTemplate {
public String getPortForwardingWithTCP(String instanceIp, String serverPort) {
return "\nlisten " + serverPort + "; \n" +
"listen [::]:" + serverPort + "; \n" +
"proxy_pass " + instanceIp + ";\n";
}
}
package com.aolda.itda.template;
import org.springframework.stereotype.Component;
@Component
public class OptionTemplate {
public String getSSL(Long certificateId) {
return "\nconf.d/include/letsencrypt-acme-challenge.conf;\n" +
"include conf.d/include/ssl-ciphers.conf;\n" +
"ssl_certificate /etc/letsencrypt/live/npm-" + certificateId + "/fullchain.pem;\n" +
"ssl_certificate_key /etc/letsencrypt/live/npm-" + certificateId + "/privkey.pem;\n";
}
public String getAssetCaching() {
return "include conf.d/include/assets.conf;\n";
}
public String getBlockExploits() {
return "include conf.d/include/block-exploits.conf;\n";
}
public String getForceSSL() {
return "include conf.d/include/force-ssl.conf;\n";
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment