# 建立伺服器連線

現在伺服器已經建立完成，那該如何讓玩家加入伺服器呢？

### 伺服器與遊戲在同一台電腦

若您的遊戲和伺服器架設在同一台電腦，您可以使用`本機 IP 連線`。

<pre class="language-markdown"><code class="lang-markdown">本機 IP :  127.0.0.1:端口號
<strong>範例 :     127.0.0.1:8211
</strong></code></pre>

在遊戲中點選 「 參加多人遊戲 (專用伺服器) 」 ：

<figure><img src="/files/DManW29qebzJvb9cn37I" alt=""><figcaption></figcaption></figure>

在最下方輸入框輸入 IP 後點擊連線：

<figure><img src="/files/IEcBi8GQVfGBzmLiYntn" alt=""><figcaption></figcaption></figure>

恭喜您，您成功進入伺服器了。(玩得愉快！)

<figure><img src="/files/skYcUfXESnS1GlMHt5dD" alt=""><figcaption></figcaption></figure>

### 伺服器與遊戲在不同台電腦 (其他玩家)

若要讓其他玩家連入伺服器，或者您的遊戲和伺服器架設在不同台電腦，有幾種方式能設置伺服器連線。

#### 使用 VPN 連線

* 優點：設置簡單、相對安全、免費。
* 缺點：每位玩家都需要安裝並加入同個 VPN 網路。

請參考 [使用 VPN 連線](/palserver-gui/install/jian-li-si-fu-qi-lian-xian/shi-yong-vpn-lian-xian.md)

#### 使用 IP 直接連線

* 優點：玩家只需要開啟遊戲輸入 IP 即可遊玩。
* 缺點：設置麻煩，網路可能被攻擊，另外需要一筆花費。

請參考 [使用 IP 直連](/palserver-gui/install/jian-li-si-fu-qi-lian-xian/shi-yong-ip-zhi-jie-lian-xian.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dalufishes-team.gitbook.io/palserver-gui/install/jian-li-si-fu-qi-lian-xian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
