<?php
namespace App\Entity\VPN\V2ray;
use App\Entity\BaseEntity;
use App\Entity\Country;
use App\Repository\VPN\V2ray\ProtocolRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Entity(repositoryClass: ProtocolRepository::class)]
class Protocol extends BaseEntity
{
#[ORM\Id]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private ?string $id = null;
#[ORM\Column(length: 255)]
private ?string $type = null;
#[ORM\Column(length: 255)]
private ?string $tag = null;
#[ORM\Column]
private ?int $port = null;
#[ORM\Column(length: 255)]
private ?string $protocol = null;
#[ORM\Column(length: 255)]
private ?string $network = null;
#[ORM\Column(length: 255)]
private ?string $security = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $realityDest = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $realityServerName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $realityPrivateKey = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $realityPublicKey = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $realityShortId = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $certificateFile = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $keyFile = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $showAddress = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $showPort = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $showHost = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $showSni = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $showFingerPrint = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $operator = null;
#[ORM\Column]
private ?bool $isFragment = null;
#[ORM\Column]
private ?bool $allowInsecure = null;
#[ORM\Column]
private ?bool $justForShow = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $trojanServiceName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $title = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $path = null;
#[ORM\ManyToOne(inversedBy: 'protocols')]
#[ORM\JoinColumn(nullable: false)]
private ?Server $server = null;
#[ORM\ManyToOne(inversedBy: 'protocols')]
private ?Country $country = null;
public function getId(): ?string
{
return $this->id;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): static
{
$this->type = $type;
return $this;
}
public function getTag(): ?string
{
return $this->tag;
}
public function setTag(string $tag): static
{
$this->tag = $tag;
return $this;
}
public function getPort(): ?int
{
return $this->port;
}
public function setPort(int $port): static
{
$this->port = $port;
return $this;
}
public function getProtocol(): ?string
{
return $this->protocol;
}
public function setProtocol(string $protocol): static
{
$this->protocol = $protocol;
return $this;
}
public function getNetwork(): ?string
{
return $this->network;
}
public function setNetwork(string $network): static
{
$this->network = $network;
return $this;
}
public function getSecurity(): ?string
{
return $this->security;
}
public function setSecurity(string $security): static
{
$this->security = $security;
return $this;
}
public function getRealityDest(): ?string
{
return $this->realityDest;
}
public function setRealityDest(?string $realityDest): static
{
$this->realityDest = $realityDest;
return $this;
}
public function getRealityServerName(): ?string
{
return $this->realityServerName;
}
public function setRealityServerName(?string $realityServerName): static
{
$this->realityServerName = $realityServerName;
return $this;
}
public function getRealityPrivateKey(): ?string
{
return $this->realityPrivateKey;
}
public function setRealityPrivateKey(?string $realityPrivateKey): static
{
$this->realityPrivateKey = $realityPrivateKey;
return $this;
}
public function getRealityPublicKey(): ?string
{
return $this->realityPublicKey;
}
public function setRealityPublicKey(?string $realityPublicKey): static
{
$this->realityPublicKey = $realityPublicKey;
return $this;
}
public function getRealityShortId(): ?string
{
return $this->realityShortId;
}
public function setRealityShortId(?string $realityShortId): static
{
$this->realityShortId = $realityShortId;
return $this;
}
public function getCertificateFile(): ?string
{
return $this->certificateFile;
}
public function setCertificateFile(?string $certificateFile): static
{
$this->certificateFile = $certificateFile;
return $this;
}
public function getKeyFile(): ?string
{
return $this->keyFile;
}
public function setKeyFile(?string $keyFile): static
{
$this->keyFile = $keyFile;
return $this;
}
public function getShowAddress(): ?string
{
return $this->showAddress == null ? $this->realityDest : $this->showAddress;
}
public function setShowAddress(?string $showAddress): static
{
$this->showAddress = $showAddress;
return $this;
}
public function getShowPort(): ?string
{
return $this->showPort == null ? $this->port : $this->showPort;
}
public function setShowPort(?string $showPort): static
{
$this->showPort = $showPort;
return $this;
}
public function getShowHost(): ?string
{
return $this->showHost == null ? $this->realityDest : $this->showHost;
}
public function setShowHost(?string $showHost): static
{
$this->showHost = $showHost;
return $this;
}
public function getShowSni(): ?string
{
return $this->showSni == null ? $this->realityServerName : $this->showSni;
}
public function setShowSni(?string $showSni): static
{
$this->showSni = $showSni;
return $this;
}
public function getShowFingerPrint(): ?string
{
return $this->showFingerPrint == null ? 'chrome' : $this->showFingerPrint;
}
public function setShowFingerPrint(?string $showFingerPrint): static
{
$this->showFingerPrint = $showFingerPrint;
return $this;
}
public function getOperator(): ?string
{
return $this->operator;
}
public function setOperator(?string $operator): static
{
$this->operator = $operator;
return $this;
}
public function isIsFragment(): ?bool
{
return $this->isFragment;
}
public function setIsFragment(bool $isFragment): static
{
$this->isFragment = $isFragment;
return $this;
}
public function isAllowInsecure(): ?bool
{
return $this->allowInsecure;
}
public function setAllowInsecure(bool $allowInsecure): static
{
$this->allowInsecure = $allowInsecure;
return $this;
}
public function isJustForShow(): ?bool
{
return $this->justForShow;
}
public function setJustForShow(bool $justForShow): static
{
$this->justForShow = $justForShow;
return $this;
}
public function getTrojanServiceName(): ?string
{
return $this->trojanServiceName;
}
public function setTrojanServiceName(?string $trojanServiceName): static
{
$this->trojanServiceName = $trojanServiceName;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): static
{
$this->title = $title;
return $this;
}
public function getPath(): ?string
{
return $this->path;
}
public function setPath(?string $path): static
{
$this->path = $path;
return $this;
}
public function getServer(): ?Server
{
return $this->server;
}
public function setServer(?Server $server): static
{
$this->server = $server;
return $this;
}
public function getCountry(): ?Country
{
return $this->country;
}
public function setCountry(?Country $country): static
{
$this->country = $country;
return $this;
}
}